Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientOption ¶
type ClientOption struct { ErrorHandling ResolverOption *ResolverOption PoolOption *PoolOption }
ClientOption controls the warming up of a client.
type ErrorHandling ¶
type ErrorHandling int
ErrorHandling controls how to handle error
const ( IgnoreError ErrorHandling = iota WarningLog ErrorLog FailFast // fail if any error occurs. )
ErrorHandling .
type Pool ¶
type Pool interface {
WarmUp(eh ErrorHandling, wuo *PoolOption, co remote.ConnOption) error
}
Pool is the interface for connection pools that supports warming up.
type PoolHelper ¶
type PoolHelper struct {
ErrorHandling
}
PoolHelper is trivial implementation to do warm-ups for connection pools.
func (*PoolHelper) WarmUp ¶
func (p *PoolHelper) WarmUp(po *PoolOption, pool remote.ConnPool, co remote.ConnOption) (err error)
WarmUp warms up the given connection pool.
type PoolOption ¶
type PoolOption struct { Targets map[string][]string // Network => addresses; if nil, use the result of service discovery ConnNum int // Connection numbers for each address Parallel int // If greater than zero, build connections in `Parallel` goroutines. }
PoolOption controls the warming up of connection pools.
type ResolverOption ¶
type ResolverOption struct {
Dests []*rpcinfo.EndpointBasicInfo
}
ResolverOption controls the warming up of service discovery.
Click to show internal directories.
Click to hide internal directories.