MCPcopy
hub / github.com/grpc-ecosystem/grpc-gateway / ServerMetadataFromContext

Function ServerMetadataFromContext

runtime/context.go:231–237  ·  view source on GitHub ↗

ServerMetadataFromContext returns the ServerMetadata in ctx

(ctx context.Context)

Source from the content-addressed store, hash-verified

229
230// ServerMetadataFromContext returns the ServerMetadata in ctx
231func ServerMetadataFromContext(ctx context.Context) (md ServerMetadata, ok bool) {
232 if ctx == nil {
233 return md, false
234 }
235 md, ok = ctx.Value(serverMetadataKey{}).(ServerMetadata)
236 return
237}
238
239// ServerTransportStream implements grpc.ServerTransportStream.
240// It should only be used by the generated files to support grpc.SendHeader

Callers 3

ForwardResponseStreamFunction · 0.85
ForwardResponseMessageFunction · 0.85
DefaultHTTPErrorHandlerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected