Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend struct { // Name of the Backend Name string `json:"name"` // IP addresses of the backend service IPs []string `json:"ips,omitempty"` // List of frontends connected to the backend Frontends []BackendFrontend `json:"frontends,omitempty"` }
Define backend services and connect them to frontends
type BackendFrontend ¶
type BackendFrontend struct { // Name of the frontend to be connected to the backend Name string `json:"name"` }
type BackendProtocol ¶
type BackendProtocol string
const ( BackendProtocolTCP BackendProtocol = "TCP" BackendProtocolPROXY BackendProtocol = "PROXY" )
type Cluster ¶
type Cluster struct { gs.GenericService gs.HasState Identifier string `json:"identifier,omitempty" anxcloud:"identifier"` Name string `json:"name,omitempty"` Implementation LoadBalancerImplementation `json:"implementation,omitempty"` FrontendPrefixes *gs.PartialResourceList `json:"frontend_prefixes,omitempty"` BackendPrefixes *gs.PartialResourceList `json:"backend_prefixes,omitempty"` Replicas *int `json:"replicas,omitempty"` }
Cluster holds the information of a load balancing cluster
func (*Cluster) EndpointURL ¶
EndpointURL returns the common URL for operations on the Cluster resource
func (*Cluster) FilterAPIRequestBody ¶
FilterAPIRequestBody adds the CommonRequestBody
type Definition ¶
type Definition definition
func (*Definition) MarshalJSON ¶
func (d *Definition) MarshalJSON() ([]byte, error)
func (*Definition) UnmarshalJSON ¶
func (d *Definition) UnmarshalJSON(data []byte) error
type Frontend ¶
type Frontend struct { // Name of the Frontend Name string `json:"name"` // Frontend service protocol Protocol FrontendProtocol `json:"protocol"` // Configure frontend - backend relation Backend FrontendBackend `json:"backend,omitempty"` // TCP specific frontend configuration TCP *FrontendTCP `json:"tcp,omitempty"` }
Define ports and protocols exposed to the public side of the Load Balancer
type FrontendBackend ¶
type FrontendBackend struct { // Backend service protocol Protocol BackendProtocol `json:"protocol"` // TCP specific backend configuration TCP *FrontendBackendTCP `json:"tcp,omitempty"` }
Configure frontend - backend relation
type FrontendBackendTCP ¶
type FrontendBackendTCP struct {
Port uint16 `json:"port"`
}
TCP specific backend configuration
type FrontendProtocol ¶
type FrontendProtocol string
const (
FrontendProtocolTCP FrontendProtocol = "TCP"
)
type FrontendTCP ¶
type FrontendTCP struct { // Port for the frontend to listen to Port uint16 `json:"port,omitempty"` }
TCP specific frontend configuration
type LoadBalancer ¶
type LoadBalancer struct { gs.GenericService gs.HasState Identifier string `json:"identifier,omitempty" anxcloud:"identifier"` Name string `json:"name,omitempty"` Generation int `json:"generation,omitempty"` Cluster *common.PartialResource `json:"cluster,omitempty" anxcloud:"filterable"` FrontendIPs *gs.PartialResourceList `json:"frontend_ips,omitempty"` SSLCertificates *gs.PartialResourceList `json:"ssl_certificates,omitempty"` // Definition configures the load balancer's frontends and backends. // This field is currently unstable and requires an update of go-anxcloud // in the near future. Definition *Definition `json:"definition,omitempty"` }
LoadBalancer holds the information of a load balancing configuration within a Cluster
func (*LoadBalancer) EndpointURL ¶
EndpointURL returns the common URL for operations on LoadBalancer resource
func (*LoadBalancer) FilterAPIRequestBody ¶
func (lb *LoadBalancer) FilterAPIRequestBody(ctx context.Context) (interface{}, error)
FilterAPIRequestBody adds the CommonRequestBody
func (*LoadBalancer) GetIdentifier ¶
func (o *LoadBalancer) GetIdentifier(ctx context.Context) (string, error)
GetIdentifier returns the primary identifier of a LoadBalancer object
type LoadBalancerImplementation ¶
type LoadBalancerImplementation string
const (
LoadBalancerImplementationHAProxy LoadBalancerImplementation = "haproxy"
)
type Node ¶
type Node struct { gs.GenericService gs.HasState Identifier string `json:"identifier,omitempty" anxcloud:"identifier"` Name string `json:"name,omitempty"` Cluster *common.PartialResource `json:"cluster,omitempty" anxcloud:"filterable"` }
Node holds the information of a load balancing node within a Cluster
func (*Node) EndpointURL ¶
EndpointURL returns the common URL for operations on the Node resource
func (*Node) FilterAPIRequestBody ¶
FilterAPIRequestBody adds the CommonRequestBody