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)
| 72 | // an init() function), and is not thread-safe. The scheme set last overrides |
| 73 | // previously set values. |
| 74 | func 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. |
no outgoing calls