Documentation
¶
Index ¶
- Variables
- func ContextStreamInterceptor(f func(context.Context) (context.Context, error)) grpc.StreamClientInterceptor
- func ContextUnaryInterceptor(f func(context.Context) (context.Context, error)) grpc.UnaryClientInterceptor
- func DeferContextStreamInterceptor(f func(context.Context)) grpc.StreamClientInterceptor
- func DeferContextUnaryInterceptor(f func(context.Context)) grpc.UnaryClientInterceptor
- func MustNew(ctx context.Context, address string, options ...grpc.DialOption) *grpc.ClientConn
- func New(_ context.Context, address string, options ...grpc.DialOption) (*grpc.ClientConn, error)
- func NewTokenCredentials(token string) credentials.PerRPCCredentials
Constants ¶
This section is empty.
Variables ¶
View Source
var ( WithChainUnaryInterceptor = grpc.WithChainUnaryInterceptor WithChainStreamInterceptor = grpc.WithChainStreamInterceptor )
Functions ¶
func ContextStreamInterceptor ¶
func ContextStreamInterceptor(f func(context.Context) (context.Context, error)) grpc.StreamClientInterceptor
ContextStreamInterceptor injects context modifications into stream client calls.
func ContextUnaryInterceptor ¶
func ContextUnaryInterceptor(f func(context.Context) (context.Context, error)) grpc.UnaryClientInterceptor
ContextUnaryInterceptor injects context modifications into unary client calls.
func DeferContextStreamInterceptor ¶ added in v0.0.2
func DeferContextStreamInterceptor(f func(context.Context)) grpc.StreamClientInterceptor
DeferContextStreamInterceptor defers a context function after stream client calls.
func DeferContextUnaryInterceptor ¶ added in v0.0.2
func DeferContextUnaryInterceptor(f func(context.Context)) grpc.UnaryClientInterceptor
DeferContextUnaryInterceptor defers a context function after unary client calls.
func MustNew ¶ added in v0.0.2
func MustNew(ctx context.Context, address string, options ...grpc.DialOption) *grpc.ClientConn
MustNew same as New but panic if error.
func New ¶ added in v0.0.2
func New(_ context.Context, address string, options ...grpc.DialOption) (*grpc.ClientConn, error)
New creates a client connection to the given target with health check enabled and some others default configurations.
func NewTokenCredentials ¶
func NewTokenCredentials(token string) credentials.PerRPCCredentials
NewTokenCredentials returns a PerRPCCredentials using the provided token.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.