lb

package
v0.0.0-...-f62483c Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2016 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 LoadBalancer

type LoadBalancer struct {
	ID          string    `json:"id,omitempty"`
	Name        string    `json:"name,omitempty"`
	Description string    `json:"description,omitempty"`
	IPaddress   string    `json:"ipAddress,omitempty"`
	Status      string    `json:"status,omitempty"`
	Pools       []Pool    `json:"pools,omitempty"`
	Links       api.Links `json:"links,omitempty"`
}

type Method

type Method string
const (
	LeastConn  Method = "leastConnection"
	RoundRobin Method = "roundRobin"
)

type Node

type Node struct {
	Status      string `json:"status,omitempty"`
	IPaddress   string `json:"ipAddress"`
	PrivatePort int    `json:"privatePort"`
}

type Persistence

type Persistence string
const (
	Standard Persistence = "standard"
	Sticky   Persistence = "sticky"
)

type Pool

type Pool struct {
	ID          string      `json:"id,omitempty"`
	Port        int         `json:"port,omitempty"`
	Method      Method      `json:"method"`
	Persistence Persistence `json:"persistence"`
	Nodes       []Node      `json:"nodes,omitempty"`
	Links       api.Links   `json:"links,omitempty"`
}

type Service

type Service struct {
	// contains filtered or unexported fields
}

func New

func New(client api.HTTP) *Service

func (*Service) Create

func (s *Service) Create(dc string, lb LoadBalancer) (*LoadBalancer, error)

func (*Service) CreatePool

func (s *Service) CreatePool(dc, lb string, pool Pool) (*Pool, error)

func (*Service) Delete

func (s *Service) Delete(dc, id string) error

func (*Service) DeletePool

func (s *Service) DeletePool(dc, lb, pool string) error

func (*Service) Get

func (s *Service) Get(dc, id string) (*LoadBalancer, error)

func (*Service) GetAll

func (s *Service) GetAll(dc string) ([]*LoadBalancer, error)

func (*Service) GetAllNodes

func (s *Service) GetAllNodes(dc, lb, pool string) ([]*Node, error)

func (*Service) GetAllPools

func (s *Service) GetAllPools(dc, lb string) ([]*Pool, error)

func (*Service) GetPool

func (s *Service) GetPool(dc, lb, pool string) (*Pool, error)

func (*Service) Update

func (s *Service) Update(dc, id string, lb LoadBalancer) error

func (*Service) UpdateNodes

func (s *Service) UpdateNodes(dc, lb, pool string, nodes ...Node) error

func (*Service) UpdatePool

func (s *Service) UpdatePool(dc, lb, id string, pool Pool) error

Jump to

Keyboard shortcuts

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