Documentation ¶
Index ¶
- func Dial(ctx context.Context, endpoint string, opts ...Option) (*grpc.ClientConn, error)
- func DialInsecure(ctx context.Context, endpoint string, opts ...Option) (*grpc.ClientConn, error)
- type Option
- func WithCredentials(credentials credentials.TransportCredentials) Option
- func WithDialOptions(dialOptions ...grpc.DialOption) Option
- func WithDiscovery(discovery registry.Discovery) Option
- func WithEnableCircuitBreaker() Option
- func WithEnableLoadBalance() Option
- func WithEnableLog(log *zap.Logger) Option
- func WithEnableMetrics() Option
- func WithEnableRequestID() Option
- func WithEnableRetry() Option
- func WithEnableTrace() Option
- func WithStreamInterceptors(streamInterceptors ...grpc.StreamClientInterceptor) Option
- func WithTimeout(timeout time.Duration) Option
- func WithUnaryInterceptors(unaryInterceptors ...grpc.UnaryClientInterceptor) Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DialInsecure ¶
DialInsecure unsafe connections
Types ¶
type Option ¶
type Option func(*options)
Option grpc dial options
func WithCredentials ¶
func WithCredentials(credentials credentials.TransportCredentials) Option
WithCredentials set dial credentials
func WithDialOptions ¶
func WithDialOptions(dialOptions ...grpc.DialOption) Option
WithDialOptions set dial options
func WithDiscovery ¶
WithDiscovery set dial discovery
func WithEnableCircuitBreaker ¶
func WithEnableCircuitBreaker() Option
WithEnableCircuitBreaker enable circuit breaker
func WithEnableLoadBalance ¶
func WithEnableLoadBalance() Option
WithEnableLoadBalance enable load balance
func WithEnableRequestID ¶ added in v1.3.2
func WithEnableRequestID() Option
WithEnableRequestID enable request id
func WithStreamInterceptors ¶
func WithStreamInterceptors(streamInterceptors ...grpc.StreamClientInterceptor) Option
WithStreamInterceptors set dial streamInterceptors
func WithUnaryInterceptors ¶
func WithUnaryInterceptors(unaryInterceptors ...grpc.UnaryClientInterceptor) Option
WithUnaryInterceptors set dial unaryInterceptors
Click to show internal directories.
Click to hide internal directories.