MCPcopy
hub / github.com/grpc/grpc-go / contextWithServer

Function contextWithServer

server.go:2053–2055  ·  view source on GitHub ↗

contextWithServer sets the Server in the context.

(ctx context.Context, server *Server)

Source from the content-addressed store, hash-verified

2051
2052// contextWithServer sets the Server in the context.
2053func contextWithServer(ctx context.Context, server *Server) context.Context {
2054 return context.WithValue(ctx, serverKey{}, server)
2055}
2056
2057// isRegisteredMethod returns whether the passed in method is registered as a
2058// method on the server. /service/method and service/method will match if the

Callers 1

handleStreamMethod · 0.85

Calls 1

WithValueMethod · 0.80

Tested by

no test coverage detected