Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Balancer ¶
type Balancer interface { // Next returns next connection for request. // return Err Next(ctx context.Context, allowBanned bool) conn.Conn // Create makes empty balancer with same implementation Create(conns []conn.Conn) Balancer // NeedRefresh ctx used to timeout // is must cancel by caller for prevent goroutine leak // without ctx NeedRefresh can return never. NeedRefresh(ctx context.Context) bool }
Balancer is an interface that implements particular load-balancing algorithm.
Balancer methods called synchronized. That is, implementations must not provide additional goroutine safety.
Click to show internal directories.
Click to hide internal directories.