@@ -27,7 +27,7 @@ type Backend interface {
2727 // The context returned from this function should be the context for the *outgoing* (to backend) call. In case you want
2828 // to forward any Metadata between the inbound request and outbound requests, you should do it manually. However, you
2929 // *must* propagate the cancel function (`context.WithCancel`) of the inbound context to the one returned.
30- GetConnection (ctx context.Context ) (context.Context , * grpc.ClientConn , error )
30+ GetConnection (ctx context.Context , fullMethodName string ) (context.Context , * grpc.ClientConn , error )
3131
3232 // AppendInfo is called to enhance response from the backend with additional data.
3333 //
@@ -71,7 +71,7 @@ func (sb *SingleBackend) String() string {
7171}
7272
7373// GetConnection returns a grpc connection to the backend.
74- func (sb * SingleBackend ) GetConnection (ctx context.Context ) (context.Context , * grpc.ClientConn , error ) {
74+ func (sb * SingleBackend ) GetConnection (ctx context.Context , fullMethodName string ) (context.Context , * grpc.ClientConn , error ) {
7575 return sb .GetConn (ctx )
7676}
7777
@@ -88,11 +88,11 @@ func (sb *SingleBackend) BuildError(streaming bool, err error) ([]byte, error) {
8888// StreamDirector returns a list of Backend objects to forward the call to.
8989//
9090// There are two proxying modes:
91- // 1. one to one: StreamDirector returns a single Backend object - proxying is done verbatim, Backend.AppendInfo might
92- // be used to enhance response with source information (or it might be skipped).
93- // 2. one to many: StreamDirector returns more than one Backend object - for unary calls responses from Backend objects
94- // are aggregated by concatenating protobuf responses (requires top-level `repeated` protobuf definition) and errors
95- // are wrapped as responses via BuildError. Responses are potentially enhanced via AppendInfo.
91+ // 1. one to one: StreamDirector returns a single Backend object - proxying is done verbatim, Backend.AppendInfo might
92+ // be used to enhance response with source information (or it might be skipped).
93+ // 2. one to many: StreamDirector returns more than one Backend object - for unary calls responses from Backend objects
94+ // are aggregated by concatenating protobuf responses (requires top-level `repeated` protobuf definition) and errors
95+ // are wrapped as responses via BuildError. Responses are potentially enhanced via AppendInfo.
9696//
9797// The presence of the `Context` allows for rich filtering, e.g. based on Metadata (headers).
9898// If no handling is meant to be done, a `codes.NotImplemented` gRPC error should be returned.
0 commit comments