Documentation
¶
Index ¶
- type L4
- func (l4 *L4) Backends() ([]instance.ID, error)
- func (l4 *L4) ConfigureHealthCheck(hc loadbalancer.HealthCheck) (loadbalancer.Result, error)
- func (l4 *L4) DeregisterBackends(ids []instance.ID) (loadbalancer.Result, error)
- func (l4 *L4) Name() string
- func (l4 *L4) Publish(route loadbalancer.Route) (loadbalancer.Result, error)
- func (l4 *L4) RegisterBackends(ids []instance.ID) (loadbalancer.Result, error)
- func (l4 *L4) Routes() ([]loadbalancer.Route, error)
- func (l4 *L4) Unpublish(extPort int) (loadbalancer.Result, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type L4 ¶
type L4 struct {
// DoName is the name of the load balancer
DoName func() string
// DoRoutes lists all known routes.
DoRoutes func() ([]loadbalancer.Route, error)
// DoPublish publishes a route in the LB by adding a load balancing rule
DoPublish func(route loadbalancer.Route) (loadbalancer.Result, error)
// DoUnpublish dissociates the load balancer from the backend service at the given port.
DoUnpublish func(extPort int) (loadbalancer.Result, error)
// DoConfigureHealthCheck configures the health checks for instance removal and reconfiguration
DoConfigureHealthCheck func(hc loadbalancer.HealthCheck) (loadbalancer.Result, error)
// RegisterBackends registers instances identified by the IDs to the LB's backend pool
DoRegisterBackends func(ids []instance.ID) (loadbalancer.Result, error)
// DoDeregisterBackend removes the specified instances from the backend pool
DoDeregisterBackends func(ids []instance.ID) (loadbalancer.Result, error)
// DoBackends returns the list of instance ids in the backend
DoBackends func() ([]instance.ID, error)
}
L4 implements the loadbalancer.L4 interface and supports testing by letting user assemble behavior dyanmically.
func (*L4) ConfigureHealthCheck ¶
func (l4 *L4) ConfigureHealthCheck(hc loadbalancer.HealthCheck) (loadbalancer.Result, error)
ConfigureHealthCheck configures the health checks for instance removal and reconfiguration
func (*L4) DeregisterBackends ¶
DeregisterBackends removes the specified instances from the backend pool
func (*L4) Publish ¶
func (l4 *L4) Publish(route loadbalancer.Route) (loadbalancer.Result, error)
Publish publishes a route in the LB by adding a load balancing rule
func (*L4) RegisterBackends ¶
RegisterBackends registers instances identified by the IDs to the LB's backend pool
Click to show internal directories.
Click to hide internal directories.