@@ -27,7 +27,7 @@ type Backend interface {
27
27
// The context returned from this function should be the context for the *outgoing* (to backend) call. In case you want
28
28
// to forward any Metadata between the inbound request and outbound requests, you should do it manually. However, you
29
29
// *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 )
31
31
32
32
// AppendInfo is called to enhance response from the backend with additional data.
33
33
//
@@ -71,7 +71,7 @@ func (sb *SingleBackend) String() string {
71
71
}
72
72
73
73
// 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 ) {
75
75
return sb .GetConn (ctx )
76
76
}
77
77
@@ -88,11 +88,11 @@ func (sb *SingleBackend) BuildError(streaming bool, err error) ([]byte, error) {
88
88
// StreamDirector returns a list of Backend objects to forward the call to.
89
89
//
90
90
// 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.
96
96
//
97
97
// The presence of the `Context` allows for rich filtering, e.g. based on Metadata (headers).
98
98
// If no handling is meant to be done, a `codes.NotImplemented` gRPC error should be returned.
0 commit comments