Documentation ¶
Overview ¶
Package grpcutil provides a bunch of utility functions to be used across the gRPC codebase.
Index ¶
- func ClientErrorCountInterceptor(component string) []grpc.DialOption
- func DialContext(ctx context.Context, opt *DialOption) (*grpc.ClientConn, func(), error)
- func Server(opt *ListenerOption) (*grpc.Server, net.Listener, func(), error)
- func ServerErrorCountInterceptor(component string) []grpc.ServerOption
- type DialOption
- type ListenerOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClientErrorCountInterceptor ¶ added in v0.1.0
func ClientErrorCountInterceptor(component string) []grpc.DialOption
func DialContext ¶
func DialContext(ctx context.Context, opt *DialOption) (*grpc.ClientConn, func(), error)
DialContext 指定のオプションでgRPCクライアント接続を行い、コネクションとクリーンアップ用funcを返す
func ServerErrorCountInterceptor ¶ added in v0.1.0
func ServerErrorCountInterceptor(component string) []grpc.ServerOption
Types ¶
type DialOption ¶
type DialOption struct { Destination string TransportCredentials credentials.TransportCredentials DialOpts []grpc.DialOption }
type ListenerOption ¶
type ListenerOption struct { Address string ServerOpts []grpc.ServerOption }
Click to show internal directories.
Click to hide internal directories.