balancer

package
v0.0.0-...-468f62d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 22, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoInstance = errors.New("[gohbase] no instance available")
)

Functions

This section is empty.

Types

type Balancer

type Balancer interface {
	Name() string
	NewPicker([]instance.Instance) Picker
}

func NewRRBalancer

func NewRRBalancer() Balancer

func NewRandomBalancer

func NewRandomBalancer() Balancer

func NewWRRBalancer

func NewWRRBalancer() Balancer

type Picker

type Picker interface {
	Pick() (instance.Instance, error)
}

type RRBalancer

type RRBalancer struct {
}

func (RRBalancer) Name

func (RRBalancer) Name() string

func (*RRBalancer) NewPicker

func (b *RRBalancer) NewPicker(instances []instance.Instance) Picker

type RandomBalancer

type RandomBalancer struct {
}

func (RandomBalancer) Name

func (RandomBalancer) Name() string

func (*RandomBalancer) NewPicker

func (b *RandomBalancer) NewPicker(instances []instance.Instance) Picker

type WRRBalancer

type WRRBalancer struct {
}

func (WRRBalancer) Name

func (WRRBalancer) Name() string

func (*WRRBalancer) NewPicker

func (b *WRRBalancer) NewPicker(instances []instance.Instance) Picker

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL