Documentation ¶
Index ¶
- func TraceUnaryClientInterceptor() grpc.UnaryClientInterceptor
- type ClientConn
- type Config
- func (config *Config) Build() (*grpc.ClientConn, error)
- func (config *Config) MustBuild() *grpc.ClientConn
- func (config *Config) MustSingleton() *grpc.ClientConn
- func (config *Config) Singleton() (*grpc.ClientConn, error)
- func (config *Config) WithDialOption(opts ...grpc.DialOption) *Config
- func (config *Config) WithLogger(logger *xlog.Logger) *Config
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TraceUnaryClientInterceptor ¶ added in v0.6.6
func TraceUnaryClientInterceptor() grpc.UnaryClientInterceptor
Types ¶
type ClientConn ¶ added in v0.8.0
type ClientConn = grpc.ClientConn
type Config ¶
type Config struct { Name string // config's name BalancerName string Addr string DialTimeout time.Duration ReadTimeout time.Duration KeepAlive *keepalive.ClientParameters RegistryConfig string SlowThreshold time.Duration Debug bool DisableSentinelInterceptor bool DisableTraceInterceptor bool DisableAidInterceptor bool DisableTimeoutInterceptor bool DisableMetricInterceptor bool DisableAccessInterceptor bool AccessInterceptorLevel string // contains filtered or unexported fields }
Config ...
func (*Config) MustBuild ¶ added in v0.11.0
func (config *Config) MustBuild() *grpc.ClientConn
MustBuild panics when error found.
func (*Config) MustSingleton ¶ added in v0.6.1
func (config *Config) MustSingleton() *grpc.ClientConn
MustSingleton panics when error found.
func (*Config) Singleton ¶ added in v0.6.1
func (config *Config) Singleton() (*grpc.ClientConn, error)
Singleton returns a singleton client conn.
func (*Config) WithDialOption ¶
func (config *Config) WithDialOption(opts ...grpc.DialOption) *Config
WithDialOption ...
Click to show internal directories.
Click to hide internal directories.