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

Function Method

server.go:2205–2211  ·  view source on GitHub ↗

Method returns the method string for the server context. The returned string is in the format of "/service/method".

(ctx context.Context)

Source from the content-addressed store, hash-verified

2203// Method returns the method string for the server context. The returned
2204// string is in the format of "/service/method".
2205func Method(ctx context.Context) (string, bool) {
2206 s := ServerTransportStreamFromContext(ctx)
2207 if s == nil {
2208 return "", false
2209 }
2210 return s.Method(), true
2211}
2212
2213// validateSendCompressor returns an error when given compressor name cannot be
2214// handled by the server or the client based on the advertised compressors.

Callers 4

TestGRPCMethodMethod · 0.92
newRPCDataFunction · 0.92
RouteAndProcessFunction · 0.92
MethodFromServerStreamFunction · 0.85

Calls 2

MethodMethod · 0.65

Tested by 1

TestGRPCMethodMethod · 0.74