Documentation
¶
Index ¶
- Variables
- type CallOption
- type CallOptions
- type Client
- type Factory
- type Option
- func Breaker(config *breaker.Config) Option
- func Cluster(cluster *upstream.Cluster) Option
- func Codec(codec codec.Codec) Option
- func DialTimeout(d time.Duration) Option
- func KeepAlivesDisable(t bool) Option
- func Kit(logger log.Kit) Option
- func Limiter(config *ratelimit.Config) Option
- func MaxIdleConns(d int) Option
- func MaxIdleConnsPerHost(d int) Option
- func Name(n string) Option
- func Namespace(n string) Option
- func PoolSize(d int) Option
- func PoolTTL(d time.Duration) Option
- func RequestTimeout(d time.Duration) Option
- func Retries(i int) Option
- func SDName(n string) Option
- func Slow(slow time.Duration) Option
- func Tracer(tracer opentracing.Tracer) Option
- type Options
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type CallOption ¶
type CallOption func(*CallOptions)
CallOption used by Invoke
func WithRequestTimeout ¶
func WithRequestTimeout(d time.Duration) CallOption
WithRequestTimeout is a CallOption which overrides that which set in Options.CallOptions
func WithRetries ¶
func WithRetries(i int) CallOption
WithRetries is a CallOption which overrides that which set in Options.CallOptions
type CallOptions ¶
type Client ¶
type Client interface {
Invoke(context.Context, interface{}, interface{}, ...CallOption) error
}
type Option ¶
type Option func(*Options)
func KeepAlivesDisable ¶
func MaxIdleConns ¶
func MaxIdleConnsPerHost ¶
func RequestTimeout ¶
The request timeout. Should this be a Call Option?
type Options ¶
type Options struct { Retries int Kit log.Kit Tracer opentracing.Tracer Codec codec.Codec Name string // 包含app_name的下游service_name SDName string Slow time.Duration Limiter *ratelimit.Config Breaker *breaker.Config Cluster *upstream.Cluster Namespace string // Connection Pool PoolSize int PoolTTL time.Duration // Transport Dial Timeout DialTimeout time.Duration // Default CallOptions CallOptions CallOptions // contains filtered or unexported fields }
Source Files
¶
Click to show internal directories.
Click to hide internal directories.