loadbalancer

package
v0.0.0-...-a355528 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2017 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

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) Backends

func (l4 *L4) Backends() ([]instance.ID, error)

Backends returns the list of instance ids as the backend

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

func (l4 *L4) DeregisterBackends(ids []instance.ID) (loadbalancer.Result, error)

DeregisterBackends removes the specified instances from the backend pool

func (*L4) Name

func (l4 *L4) Name() string

Name is the name of the load balancer

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

func (l4 *L4) RegisterBackends(ids []instance.ID) (loadbalancer.Result, error)

RegisterBackends registers instances identified by the IDs to the LB's backend pool

func (*L4) Routes

func (l4 *L4) Routes() ([]loadbalancer.Route, error)

Routes lists all known routes.

func (*L4) Unpublish

func (l4 *L4) Unpublish(extPort int) (loadbalancer.Result, error)

Unpublish dissociates the load balancer from the backend service at the given port.

Jump to

Keyboard shortcuts

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