Documentation
¶
Overview ¶
Package balancer implements a capacity based load balancer where each entity periodically reports its actual processing capacity and the balancer issues requests based on those numbers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Balancer ¶
type Balancer struct {
// contains filtered or unexported fields
}
The load balancer for a single topic.
func (*Balancer) Balance ¶
Returns an id to which to send the next message to. The optional ex (can be nil) is used to exclude an entity from balancing to (if it's the only one available then this guarantee will be forfeit).
func (*Balancer) Capacity ¶
Returns the total capacity that the balancer can handle, optionally with ex excluded from the count.
func (*Balancer) Unregister ¶
Unregisters an entity from the possible balancing destinations.
Click to show internal directories.
Click to hide internal directories.