Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConnectPool ¶
type ConnectPool struct { ConnectType connectType HostCheckTimeGap time.Duration HostCheckTimeout time.Duration BreakerFailTimes int BreakerTryTimes int // contains filtered or unexported fields }
ConnectPool describe a connection pools, provides health check and circuit breaker to maintains those connection via different address.
func NewConnectPool ¶
func NewConnectPool(address []string) *ConnectPool
NewConnectPool get a new ConnectPool with given address. Those address should be the same service and equal to each other.
func (*ConnectPool) GetAddress ¶
func (cp *ConnectPool) GetAddress() string
GetAddress return a available address(for now) in address list.
Click to show internal directories.
Click to hide internal directories.