Documentation ¶
Index ¶
- type Agent
- type Balancer
- func (b *Balancer) AddDestination(svc *types.Service, dst *types.Destination) error
- func (b *Balancer) AddService(svc *types.Service) error
- func (b *Balancer) ApplyToRaft(cmd *engine.Command) error
- func (b *Balancer) DeleteDestination(dst *types.Destination) error
- func (b *Balancer) DeleteService(name string) error
- func (b *Balancer) GetDestination(name string) (*types.Destination, error)
- func (b *Balancer) GetLeader() string
- func (b *Balancer) GetService(name string) (*types.Service, error)
- func (b *Balancer) GetServices() []types.Service
- func (b *Balancer) IsLeader() bool
- func (b *Balancer) JoinPool() error
- func (b *Balancer) Leave()
- func (b *Balancer) Shutdown()
- type ErrCrashError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Balancer ¶
Balancer represents the Load Balancer
func NewBalancer ¶
func NewBalancer(config *config.BalancerConfig) (*Balancer, error)
NewBalancer initializes a new balancer TODO: Graceful shutdown on initialization errors
func (*Balancer) AddDestination ¶
func (*Balancer) AddService ¶
AddService ...
func (*Balancer) DeleteDestination ¶
func (b *Balancer) DeleteDestination(dst *types.Destination) error
func (*Balancer) DeleteService ¶
func (*Balancer) GetDestination ¶
func (b *Balancer) GetDestination(name string) (*types.Destination, error)
func (*Balancer) GetService ¶
GetService get a service
func (*Balancer) GetServices ¶
GetServices get all services
type ErrCrashError ¶
type ErrCrashError struct {
// contains filtered or unexported fields
}
func (ErrCrashError) Error ¶
func (e ErrCrashError) Error() string
Click to show internal directories.
Click to hide internal directories.