Documentation ¶
Index ¶
- type Balancer
- type FusisBalancer
- func (b *FusisBalancer) AddCheck(check types.CheckSpec) error
- func (b *FusisBalancer) AddDestination(svc *types.Service, dst *types.Destination) error
- func (b *FusisBalancer) AddService(svc *types.Service) error
- func (b *FusisBalancer) DeleteCheck(check types.CheckSpec) error
- func (b *FusisBalancer) DeleteDestination(dst *types.Destination) error
- func (b *FusisBalancer) DeleteService(name string) error
- func (b *FusisBalancer) GetDestinations(svc *types.Service) ([]types.Destination, error)
- func (b *FusisBalancer) GetService(name string) (*types.Service, error)
- func (b *FusisBalancer) GetServices() ([]types.Service, error)
- func (b *FusisBalancer) IsLeader() bool
- func (b *FusisBalancer) Shutdown()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Balancer ¶
type Balancer interface { GetServices() ([]types.Service, error) AddService(*types.Service) error GetService(name string) (*types.Service, error) DeleteService(string) error AddDestination(*types.Service, *types.Destination) error // GetDestination(name string) (*types.Destination, error) GetDestinations(svc *types.Service) ([]types.Destination, error) DeleteDestination(*types.Destination) error AddCheck(check types.CheckSpec) error DeleteCheck(check types.CheckSpec) error IsLeader() bool Shutdown() }
func NewBalancer ¶
func NewBalancer(config *config.BalancerConfig) (Balancer, error)
NewBalancer initializes a new balancer TODO: Graceful shutdown on initialization errors
type FusisBalancer ¶
Balancer represents the Load Balancer
func (*FusisBalancer) AddDestination ¶
func (b *FusisBalancer) AddDestination(svc *types.Service, dst *types.Destination) error
func (*FusisBalancer) AddService ¶
func (b *FusisBalancer) AddService(svc *types.Service) error
AddService ...
func (*FusisBalancer) DeleteCheck ¶
func (b *FusisBalancer) DeleteCheck(check types.CheckSpec) error
func (*FusisBalancer) DeleteDestination ¶
func (b *FusisBalancer) DeleteDestination(dst *types.Destination) error
func (*FusisBalancer) DeleteService ¶
func (b *FusisBalancer) DeleteService(name string) error
func (*FusisBalancer) GetDestinations ¶
func (b *FusisBalancer) GetDestinations(svc *types.Service) ([]types.Destination, error)
func (*FusisBalancer) GetService ¶
func (b *FusisBalancer) GetService(name string) (*types.Service, error)
GetService get a service
func (*FusisBalancer) GetServices ¶
func (b *FusisBalancer) GetServices() ([]types.Service, error)
GetServices get all services
func (*FusisBalancer) IsLeader ¶
func (b *FusisBalancer) IsLeader() bool
func (*FusisBalancer) Shutdown ¶
func (b *FusisBalancer) Shutdown()
Click to show internal directories.
Click to hide internal directories.