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

Function SetDefaultScheme

resolver/resolver.go:74–77  ·  view source on GitHub ↗

SetDefaultScheme sets the default scheme that will be used. The default scheme is initially set to "passthrough". NOTE: this function must only be called during initialization time (i.e. in an init() function), and is not thread-safe. The scheme set last overrides previously set values.

(scheme string)

Source from the content-addressed store, hash-verified

72// an init() function), and is not thread-safe. The scheme set last overrides
73// previously set values.
74func SetDefaultScheme(scheme string) {
75 defaultScheme = scheme
76 internal.UserSetDefaultScheme = true
77}
78
79// GetDefaultScheme gets the default scheme that will be used by grpc.Dial. If
80// SetDefaultScheme is never called, the default scheme used by grpc.NewClient is "dns" instead.

Callers 4

mainFunction · 0.92
mainFunction · 0.92

Calls

no outgoing calls