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

Function getMethodConfig

clientconn.go:1097–1109  ·  view source on GitHub ↗
(sc *ServiceConfig, method string)

Source from the content-addressed store, hash-verified

1095}
1096
1097func getMethodConfig(sc *ServiceConfig, method string) MethodConfig {
1098 if sc == nil {
1099 return MethodConfig{}
1100 }
1101 if m, ok := sc.Methods[method]; ok {
1102 return m
1103 }
1104 i := strings.LastIndex(method, "/")
1105 if m, ok := sc.Methods[method[:i+1]]; ok {
1106 return m
1107 }
1108 return sc.Methods[""]
1109}
1110
1111// GetMethodConfig gets the method config of the input method.
1112// If there's an exact match for input method (i.e. /service/method), we return

Callers 2

SelectConfigMethod · 0.85
GetMethodConfigMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected