Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type IphashBalancer ¶
type IphashBalancer struct{}
*
- Iphash balancer
func (*IphashBalancer) Elect ¶
func (b *IphashBalancer) Elect(context core.Context, backends []*core.Backend) (*core.Backend, error)
*
- Elect backend using iphash strategy
- It's naive impl (most possibly with bad performance) using
- FNV-1a hash (https://en.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%93Vo_hash_function)
- TODO: Improve as needed
type RoundrobinBalancer ¶
type RoundrobinBalancer struct {
// contains filtered or unexported fields
}
*
- Roundrobin balancer
Source Files ¶
Click to show internal directories.
Click to hide internal directories.