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

Method GetMethodConfig

clientconn.go:1119–1124  ·  view source on GitHub ↗

GetMethodConfig gets the method config of the input method. If there's an exact match for input method (i.e. /service/method), we return the corresponding MethodConfig. If there isn't an exact match for the input method, we look for the service's default config under the service (i.e /service/) and

(method string)

Source from the content-addressed store, hash-verified

1117// If there is a default MethodConfig for the service, we return it.
1118// Otherwise, we return an empty MethodConfig.
1119func (cc *ClientConn) GetMethodConfig(method string) MethodConfig {
1120 // TODO: Avoid the locking here.
1121 cc.mu.RLock()
1122 defer cc.mu.RUnlock()
1123 return getMethodConfig(cc.sc, method)
1124}
1125
1126func (cc *ClientConn) healthCheckConfig() *healthCheckConfig {
1127 cc.mu.RLock()

Calls 1

getMethodConfigFunction · 0.85