Documentation ¶
Overview ¶
Package client defines the Options of client
Package client defines the Options about remote transport of client.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfigLocks ¶
ConfigLocks records changing made by options that are not allowed further modifications.
func (*ConfigLocks) ApplyLocks ¶
func (cl *ConfigLocks) ApplyLocks(cfg rpcinfo.MutableRPCConfig, svr remoteinfo.RemoteInfo)
ApplyLocks applies the locking operations on rpcinfo.RPCConfig and internal.RemoteInfo.
func (*ConfigLocks) Merge ¶
func (cl *ConfigLocks) Merge(c2 *ConfigLocks)
Merge merges another ConfigLocks into the current one.
type Options ¶
type Options struct { Cli *rpcinfo.EndpointBasicInfo Svr *rpcinfo.EndpointBasicInfo Configs rpcinfo.RPCConfig Locks *ConfigLocks Once *configutil.OptionOnce MetaHandlers []remote.MetaHandler RemoteOpt *remote.ClientOption Proxy proxy.ForwardProxy Resolver discovery.Resolver HTTPResolver http.Resolver Balancer loadbalance.Loadbalancer BalancerCacheOpt *lbcache.Options PoolCfg *connpool2.IdleConfig ErrHandle func(context.Context, error) error Targets string CBSuite *circuitbreak.CBSuite Timeouts rpcinfo.TimeoutProvider ACLRules []acl.RejectFunc MWBs []endpoint.MiddlewareBuilder IMWBs []endpoint.MiddlewareBuilder Bus event.Bus Events event.Queue ExtraTimeout time.Duration // DebugInfo should only contain objects that are suitable for json serialization. DebugInfo utils.Slice DebugService diagnosis.Service // Observability TracerCtl *rpcinfo.TraceController StatsLevel *stats.Level // retry policy RetryMethodPolicies map[string]retry.Policy RetryContainer *retry.Container RetryWithResult *retry.ShouldResultRetry // fallback policy Fallback *fallback.Policy CloseCallbacks []func() error WarmUpOption *warmup.ClientOption // GRPC GRPCConnPoolSize uint32 GRPCConnectOpts *grpc.ConnectOptions // XDS XDSEnabled bool XDSRouterMiddleware endpoint.Middleware // Context backup CtxBackupHandler backup.BackupHandler Streaming stream.StreamingConfig }
Options is used to initialize a client.
func (*Options) InitRetryContainer ¶ added in v0.9.0
func (o *Options) InitRetryContainer()
InitRetryContainer init retry container and add close callback
Click to show internal directories.
Click to hide internal directories.