Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Grpc ¶
type Grpc interface {
// DEPRECATED: Use Connect instead, will be removed in v1.18.
Client(ctx context.Context, name string) (*grpc.ClientConn, error)
// ClientCredentials registers groups of transport credentials for gRPC clients
// (e.g. mTLS). Keys are referenced via `grpc.clients.<name>.creds` and
// override the default insecure credentials on matching connections.
ClientCredentials(map[string]credentials.TransportCredentials)
// ClientStatsHandlerGroups sets the gRPC client stats handler groups.
ClientStatsHandlerGroups(map[string][]stats.Handler)
// Connect gets a gRPC client connection to the given client.
// The client connection will be cached to improve performance.
Connect(client string) (*grpc.ClientConn, error)
// Listen starts the gRPC server with the given listener.
Listen(l net.Listener) error
// Run starts the gRPC server.
Run(host ...string) error
// Server gets the gRPC server instance.
Server() *grpc.Server
// ServerCredentials sets the gRPC server transport credentials (e.g. TLS/mTLS).
// When nil, the server listens without TLS.
ServerCredentials(credentials.TransportCredentials)
// ServerStatsHandlers sets the gRPC server stats handlers.
ServerStatsHandlers([]stats.Handler)
// Shutdown stops the gRPC server.
Shutdown(force ...bool) error
// UnaryClientInterceptorGroups sets the gRPC client interceptor groups.
UnaryClientInterceptorGroups(map[string][]grpc.UnaryClientInterceptor)
// UnaryServerInterceptors sets the gRPC server interceptors.
UnaryServerInterceptors([]grpc.UnaryServerInterceptor)
}
Click to show internal directories.
Click to hide internal directories.