Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow for Director to set OutgoingMetadata on proxied calls #19

Open
mwitkow opened this issue Nov 20, 2017 · 3 comments
Open

Allow for Director to set OutgoingMetadata on proxied calls #19

mwitkow opened this issue Nov 20, 2017 · 3 comments

Comments

@mwitkow
Copy link
Owner

mwitkow commented Nov 20, 2017

As mentioned in
improbable-eng/grpc-web#91
and in discussion of #16 (@peteredge's comment) we need a way to add metadata to outgoing calls.

The improbable-eng/grpc-web#91 broke because of gRPC-Go changes in 1.5 that separated the inbound and output contexts. This meant that it no longer forwarded the metadata.

I propose the following change:

type StreamDirector func(ctx context.Context, fullMethodName string) (*grpc.ClientConn, error)

to

type StreamDirector func(ctx context.Context, fullMethodName string) (context.Context, *grpc.ClientConn, error)

Where the returned context will be used as a base for the call.

Thoughts? @yifanzz

@cleanerx
Copy link

Just ran into this problem. The readme needs adjustment as well, since it reflects to old behavior

@yifanzz
Copy link

yifanzz commented Nov 22, 2017

@mwitkow that looks good to me. Will create a PR for the change.

@ghost
Copy link

ghost commented Jan 30, 2018

It seems this was fixed in last commit but issue was not closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants