Documentation ¶
Index ¶
- func AppendOutgoingRequestID() grpc.UnaryClientInterceptor
- func Conn(service string) *grpc.ClientConn
- func Credentials(serverURL string, caCerts [][]byte, clientCert, clientKey []byte) (grpc.DialOption, error)
- func DeregisterConnection(service string)
- func DialH2C(serverURL string, opts ...grpc.DialOption) (*grpc.ClientConn, error)
- func RegisterConnection(service string, cconn *grpc.ClientConn)
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, clientCert, clientKey []byte) (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 ¶
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.
func RegisterConnection ¶
func RegisterConnection(service string, cconn *grpc.ClientConn)
RegisterConnection registers the given gRPC connection for usage under the specified service name.
Types ¶
This section is empty.