MCPcopy Create free account
hub / github.com/couchbase/cbft / wrapServerStream

Function wrapServerStream

grpc_server.go:338–344  ·  view source on GitHub ↗

wrapServerStream returns a ServerStream that has the ability to overwrite context.

(stream grpc.ServerStream)

Source from the content-addressed store, hash-verified

336// wrapServerStream returns a ServerStream that has
337// the ability to overwrite context.
338func wrapServerStream(stream grpc.ServerStream) *wrappedServerStream {
339 if existing, ok := stream.(*wrappedServerStream); ok {
340 return existing
341 }
342 return &wrappedServerStream{ServerStream: stream,
343 wrappedContext: stream.Context()}
344}
345
346func AddServerInterceptor() grpc.ServerOption {
347 return grpc.StreamInterceptor(serverInterceptor)

Callers 1

serverInterceptorFunction · 0.85

Calls 1

ContextMethod · 0.80

Tested by

no test coverage detected