I believe what you are looking for is the yet-to-be-implemented HandlerRegistry.lookupMethod override with the authority. We avoid putting the pseudo headers in the Metadata (and strip them out if you give them to us) because they cost latency and almost no one needs them.
On Friday, February 3, 2017 at 2:24:17 PM UTC-8, Joey Bratton wrote: > > It looks like https://github.com/grpc/grpc-java/pull/2235 refactored how > the header Metadata gets populated and the "pseudo" headers (e.g. > `:authority`, `:path`, etc.) are no longer included in the `headers` object > that is passed to the server interceptor. Is there some other mechanism for > getting access to those headers? In particular, we're interested in the > `:authority`. We're looking at co-process/proxy solutions and if we were > going to build a custom solution directly on gRPC then it would be useful > to get access to the authority to potentially use it for request routing. > > Hypothetical authority-based routing scenario: > > - DNS for *.services.local is routed to localhost > - Client makes outbound call to target.services.local > - Proxy co-process receives the request and parses `target` out of the > authority, then creates a new channel with a name resolver that knows how > to discover the real address(es) for the target service and forwards the > request. > > Thanks! > Joey Bratton > -- You received this message because you are subscribed to the Google Groups "grpc.io" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/grpc-io. To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/582fc46a-4f5c-47de-9636-b3e14f01e921%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
