balancer

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2016 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetNames

func GetNames(cn base.Connection, dataCenter string) ([]string, error)

func IDByName

func IDByName(cn base.Connection, dataCenter string, name string) (string, error)

Types

type Create

type Create struct {
	DataCenter  string `json:"-" valid:"required" URIParam:"yes"`
	Name        string `valid:"required"`
	Description string `valid:"required"`
	Status      string `json:",omitempty" oneOf:"enabled,disabled,optional"`
}

type CreatePool

type CreatePool struct {
	LoadBalancer `argument:"composed" URIParam:"LoadBalancerId,DataCenter" json:"-"`
	Port         int64  `valid:"required"`
	Method       string `oneOf:"roundRobin,leastConnection"`
	Persistence  string `oneOf:"standard,sticky"`
}

type Delete

type Delete struct {
	LoadBalancer `argument:"composed" URIParam:"LoadBalancerId,DataCenter" json:"-"`
}

type DeletePool

type DeletePool struct {
	LoadBalancer `argument:"composed" URIParam:"LoadBalancerId,DataCenter" json:"-"`
	PoolId       string `valid:"required" URIParam:"yes" json:"-"`
}

type Entity

type Entity struct {
	Id          string
	Name        string
	Description string
	IpAddress   string
	Status      string
	Pools       []Pool
	Links       []models.LinkEntity
}

func Load

func Load(cn base.Connection, dataCenter string) ([]Entity, error)

type Get

type Get struct {
	LoadBalancer `argument:"composed" URIParam:"LoadBalancerId,DataCenter" json:"-"`
}

type GetNodes

type GetNodes struct {
	LoadBalancer `argument:"composed" URIParam:"LoadBalancerId,DataCenter" json:"-"`
	PoolId       string `valid:"required" URIParam:"yes"`
}

type GetPool

type GetPool struct {
	LoadBalancer `argument:"composed" URIParam:"LoadBalancerId,DataCenter" json:"-"`
	PoolId       string `valid:"required" URIParam:"yes"`
}

type List

type List struct {
	DataCenter string `valid:"required" URIParam:"yes"`
}

type ListPools

type ListPools struct {
	LoadBalancer `argument:"composed" URIParam:"LoadBalancerId,DataCenter"`
}

type LoadBalancer

type LoadBalancer struct {
	LoadBalancerId   string
	LoadBalancerName string
	DataCenter       string
}

func (*LoadBalancer) GetNames

func (b *LoadBalancer) GetNames(cn base.Connection, property string) ([]string, error)

func (*LoadBalancer) InferID

func (b *LoadBalancer) InferID(cn base.Connection) error

func (*LoadBalancer) Validate

func (b *LoadBalancer) Validate() error

type Node

type Node struct {
	Name        string
	Status      string
	IpAddress   string
	PrivatePort int64
	Links       []models.LinkEntity
}

type Pool

type Pool struct {
	Id          string
	Port        int64
	Method      string
	Persistence string
	Nodes       []Node
	Links       []models.LinkEntity
}

type Update

type Update struct {
	LoadBalancer `argument:"composed" URIParam:"LoadBalancerId,DataCenter" json:"-"`
	Name         string `valid:"required"`
	Description  string `valid:"required"`
	Status       string `json:",omitempty" oneOf:"enabled,disabled,optional"`
}

type UpdateNode

type UpdateNode struct {
	Status      string `json:",omitempty"`
	IpAddress   string `valid:"required"`
	PrivatePort int64  `valid:"required"`
}

type UpdateNodes

type UpdateNodes struct {
	LoadBalancer `argument:"composed" URIParam:"LoadBalancerId,DataCenter" json:"-"`
	PoolId       string `valid:"required" URIParam:"yes"`
	Nodes        []UpdateNode
}

func (*UpdateNodes) MarshalJSON

func (u *UpdateNodes) MarshalJSON() ([]byte, error)

func (*UpdateNodes) Validate

func (u *UpdateNodes) Validate() error

type UpdatePool

type UpdatePool struct {
	LoadBalancer `argument:"composed" URIParam:"LoadBalancerId,DataCenter" json:"-"`
	PoolId       string `json:"-" valid:"required" URIParam:"yes"`
	Method       string `oneOf:"roundRobin,leastConnection"`
	Persistence  string `oneOf:"standard,sticky"`
}

Jump to

Keyboard shortcuts

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