Documentation ¶
Index ¶
- Constants
- type LoadBalancer
- type Options
- type Port
- type Ports
- type ProxyProtocol
- type Server
- type Servers
- func (o Servers) ContainsIP(ip string) bool
- func (o Servers) ContainsName(name string) bool
- func (o Servers) Equal(n Servers) bool
- func (o Servers) IndexOfIP(ip string) int
- func (o Servers) IndexOfName(name string) int
- func (s Servers) Len() int
- func (s Servers) Less(i, j int) bool
- func (o Servers) RemoveByIP(ip string) Servers
- func (o Servers) RemoveByName(name string) Servers
- func (s Servers) Swap(i, j int)
Constants ¶
View Source
const ( Version = "v1" LBName = "lb" LBPath = "/" + Version + "/" + LBName )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LoadBalancer ¶
type LoadBalancer struct { Name string `json:"name,omitempty"` IP string `json:"ip,omitempty"` CIDR string `json:"cidr,omitempty"` Options Options `json:"options,omitempty"` Ports Ports `json:"ports,omitempty"` }
func NewLoadBalancerFromBytes ¶
func NewLoadBalancerFromBytes(b []byte) (lb *LoadBalancer, err error)
func (*LoadBalancer) JSON ¶
func (lb *LoadBalancer) JSON() ([]byte, error)
func (*LoadBalancer) ValidateClient ¶
func (lb *LoadBalancer) ValidateClient() error
func (*LoadBalancer) ValidateServer ¶
func (lb *LoadBalancer) ValidateServer() error
type Options ¶
type Options struct { Frontend []string `json:"frontend,omitempty"` Backend []string `json:"backend,omitempty"` ProxyProtocol ProxyProtocol `json:"proxyProtocol,omitempty"` CheckProxyProtocol bool `json:"checkProxyProtocol,omitempty"` DefaultServer string `json:"defaultServer,omitempty` }
type ProxyProtocol ¶
type ProxyProtocol string
const ( ProxyProtocolV1 ProxyProtocol = "v1" ProxyProtocolV2 = "v2" )
func ParseProxyProtocol ¶
func ParseProxyProtocol(s string) (pp ProxyProtocol, err error)
type Servers ¶
type Servers []Server
func (Servers) ContainsIP ¶
func (Servers) ContainsName ¶
func (Servers) IndexOfName ¶
func (Servers) RemoveByIP ¶
func (Servers) RemoveByName ¶
Click to show internal directories.
Click to hide internal directories.