Documentation ¶
Index ¶
- func AppendOutgoingRequestID() grpc.UnaryClientInterceptor
- func Conn(service string) *grpc.ClientConn
- func Credentials(serverURL string, caCerts [][]byte, fullCert tls.Certificate, ...) (grpc.DialOption, error)
- func DeregisterConnection(service string)
- func DialH2C(serverURL string, opts ...grpc.DialOption) (*grpc.ClientConn, error)deprecated
- func DialH2CContext(ctx context.Context, serverURL string, opts ...grpc.DialOption) (*grpc.ClientConn, error)
- func RegisterConnection(service string, cconn *grpc.ClientConn)
- func SkipVerify(cfg *tls.Config)
- type TLSOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendOutgoingRequestID ¶ added in v0.0.2
func AppendOutgoingRequestID() grpc.UnaryClientInterceptor
AppendOutgoingRequestID reads the incoming Request-ID from the context and appends it to the outgoing context. Forwarding Request-IDs from gRPC service to service allows for request tracking across any number of services.
func Conn ¶
func Conn(service string) *grpc.ClientConn
Conn returns the global grpc.ClientConn for the given service. If the connection has not yet been initialized, it will panic.
func Credentials ¶
func Credentials(serverURL string, caCerts [][]byte, fullCert tls.Certificate, tlsopts ...TLSOption) (grpc.DialOption, error)
Credentials returns a gRPC DialOption configured for mutual TLS.
func DeregisterConnection ¶
func DeregisterConnection(service string)
DeregisterConnection deregisters the gRPC connection for the specified service name. The server is not stopped before it's deregistered. If no connection is registered for the service name, it will panic.
func DialH2C
deprecated
func DialH2C(serverURL string, opts ...grpc.DialOption) (*grpc.ClientConn, error)
DialH2C will establish a connection to the grpcserver.NewStandardH2C server listening at the passed in URL, and return a connection for it. This will _not_ register it in the client registry, that is left to the user.
Deprecated: Use DialH2CContext instead.
func DialH2CContext ¶ added in v0.0.15
func DialH2CContext(ctx context.Context, serverURL string, opts ...grpc.DialOption) (*grpc.ClientConn, error)
DialH2CContext will establish a connection to the grpcserver.NewStandardH2C server listening at the passed in URL, and return a connection for it. This will _not_ register it in the client registry, that is left to the user. By default the call is non-blocking. Use WithBlock for a blocking call. In the blocking case, ctx can be used to cancel or expire the pending connection.
func RegisterConnection ¶
func RegisterConnection(service string, cconn *grpc.ClientConn)
RegisterConnection registers the given gRPC connection for usage under the specified service name.
func SkipVerify ¶ added in v0.0.6
SkipVerify disables verification of server certificates.