Documentation
¶
Index ¶
- type Backend
- type BackendSet
- type Certificate
- type Client
- func (c *Client) CreateBackend(loadBalancerID string, backendSetName string, backend *Backend) (bool, *bmc.Error)
- func (c *Client) CreateBackendSet(loadBalancerID string, backendSet *BackendSet) (bool, *bmc.Error)
- func (c *Client) CreateListener(loadBalancerID string, listener *Listener) (bool, *bmc.Error)
- func (c *Client) DeleteBackend(listener *Backend)
- func (c *Client) DeleteBackendSet(loadBalancerID string, backendSetName string) (bool, *bmc.Error)
- func (c *Client) DeleteListener(loadBalancerID string, listenerName string) (bool, *bmc.Error)
- func (c *Client) GetBackend(loadBalancerID string, backendSetName string, backendName string) (Backend, *bmc.Error)
- func (c *Client) GetBackendSet(loadBalancerID string, backendSetName string) (BackendSet, *bmc.Error)
- func (c *Client) GetHealthChecker(loadBalancerID string, backendSetName string) (HealthChecker, *bmc.Error)
- func (c *Client) GetLoadBalancer(loadBalancerID string) (LoadBalancer, error)
- func (c *Client) ListBackend(loadBalancerID string, backendSetName string) ([]Backend, *bmc.Error)
- func (c *Client) ListBackendSet(loadBalancerID string) ([]BackendSet, *bmc.Error)
- func (c *Client) ListCertificates(loadBalancerID string) ([]Certificate, *bmc.Error)
- func (c *Client) ListLoadBalancers() ([]LoadBalancer, *bmc.Error)
- func (c *Client) Request(method string, reqURL string, body interface{}) (*http.Response, error)
- func (c *Client) UpdateBackend(listener *Backend)
- func (c *Client) UpdateBackendSet(listener *BackendSet)
- func (c *Client) UpdateListener(listener *Listener)
- type HealthChecker
- type IP
- type Listener
- type LoadBalancer
- type SSLConfiguration
- type SessionPersistenceConfiguration
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend struct {
Backup bool `json:"backup,omitempty"`
Drain bool `json:"drain,omitempty"`
IPAddress string `json:"ipAddress"`
Name string `json:"name,omitempty"`
Offline bool `json:"offline,omitempty"`
Port int `json:"port"`
Weight int `json:"weight,omitempty"`
}
Backend reference from https://docs.us-phoenix-1.oraclecloud.com/api/#/en/loadbalancer/20170115/Backend/
type BackendSet ¶
type BackendSet struct {
Backends []Backend `json:"backends,omitempty"`
HealthChecker *HealthChecker `json:"healthChecker,omitempty"`
Name string `json:"name"`
Policy string `json:"policy"`
SSLConfig *SSLConfiguration `json:"sslConfiguration,omitempty"`
SessionPersistence *SessionPersistenceConfiguration `json:"sessionPersistenceConfiguration,omitempty"`
}
BackendSet reference from https://docs.us-phoenix-1.oraclecloud.com/api/#/en/loadbalancer/20170115/BackendSet/
type Certificate ¶
type Certificate struct {
// A friendly name for the certificate bundle
CertificateName string `json:"certificateName"`
// The Certificate Authority certificate
CACertificates string `json:"caCertificate,omitempty"`
// The public certificate, in PEM format
PublicCertificate string `json:"publicCertificate"`
}
Certificate represents the listener's configuration: https://docs.us-phoenix-1.oraclecloud.com/api/#/en/loadbalancer/20170115/Certificate/
type Client ¶
Client is a client for the load balancing services API.
func (*Client) CreateBackend ¶
func (c *Client) CreateBackend(loadBalancerID string, backendSetName string, backend *Backend) (bool, *bmc.Error)
CreateBackend adds a backend set to a load balancer
func (*Client) CreateBackendSet ¶
CreateBackendSet adds a backend set to a load balancer
func (*Client) CreateListener ¶
CreateListener adds a listener to a load balancer
func (*Client) DeleteBackend ¶
DeleteBackend deletes a backend set to a load balancer
func (*Client) DeleteBackendSet ¶
DeleteBackendSet deletes a backend set to a load balancer
func (*Client) DeleteListener ¶
DeleteListener deletes a listener from a load balancer
func (*Client) GetBackend ¶
func (c *Client) GetBackend(loadBalancerID string, backendSetName string, backendName string) (Backend, *bmc.Error)
GetBackend gets the health check policy information for a given load balancer and backend set.
func (*Client) GetBackendSet ¶
func (c *Client) GetBackendSet(loadBalancerID string, backendSetName string) (BackendSet, *bmc.Error)
GetBackendSet gets the health check policy information for a given load balancer and backend set.
func (*Client) GetHealthChecker ¶
func (c *Client) GetHealthChecker(loadBalancerID string, backendSetName string) (HealthChecker, *bmc.Error)
GetHealthChecker gets the health check policy information for a given load balancer and backend set.
func (*Client) GetLoadBalancer ¶
func (c *Client) GetLoadBalancer(loadBalancerID string) (LoadBalancer, error)
GetLoadBalancer gets the specified load balancer's configuration information
func (*Client) ListBackend ¶
ListBackend gets the health check policy information for a given load balancer and backend set.
func (*Client) ListBackendSet ¶
func (c *Client) ListBackendSet(loadBalancerID string) ([]BackendSet, *bmc.Error)
ListBackendSet gets the health check policy information for a given load balancer and backend set.
func (*Client) ListCertificates ¶
func (c *Client) ListCertificates(loadBalancerID string) ([]Certificate, *bmc.Error)
ListCertificates lists all load balancers in the specified compartment
func (*Client) ListLoadBalancers ¶
func (c *Client) ListLoadBalancers() ([]LoadBalancer, *bmc.Error)
ListLoadBalancers lists all load balancers in the specified compartment
func (*Client) Request ¶
Request builds the API endpoint given a URL and sends it to the API request
func (*Client) UpdateBackend ¶
UpdateBackend updates a backend set to a load balancer
func (*Client) UpdateBackendSet ¶
func (c *Client) UpdateBackendSet(listener *BackendSet)
UpdateBackendSet updates a backend set to a load balancer
func (*Client) UpdateListener ¶
UpdateListener updates a listener from a load balancer
type HealthChecker ¶
type HealthChecker struct {
Interval int `json:"intervalInMillis,omitempty"`
Port int `json:"port,omitempty"`
Protocol string `json:"protocol"` // HTTP or TCP
Response string `json:"responseBodyRegex,omitempty"` // ^(500|40[1348])$
Retries int `json:"retries,omitempty"`
ReturnCode int `json:"returnCode,omitempty"`
Timeout int `json:"timeoutInMillis,omitempty"`
URLPath string `json:"urlPath"`
}
HealthChecker reference from https://docs.us-phoenix-1.oraclecloud.com/api/#/en/loadbalancer/20170115/HealthChecker/
type Listener ¶
type Listener struct {
BackendSetName string `json:"defaultBackendSetName"`
Name string `json:"name"`
Port int `json:"port"`
Protocol string `json:"protocol"` // HTTP or TCP
SSLConfig *SSLConfiguration `json:"sslConfiguration,omitempty"`
}
Listener represents the listener's configuration: https://docs.us-phoenix-1.oraclecloud.com/api/#/en/loadbalancer/20170115/Listener/
type LoadBalancer ¶
type LoadBalancer struct {
// A mapping of strings to BackendSet objects
BackendSets map[string]BackendSet `json:"backendSets,omitempty"`
// A user-friendly name
DisplayName string `json:"displayName"`
// A mapping of strings to Certificate objects
Certificates map[string]Certificate `json:"certificates,omitempty"`
// The OCID of the compartment containing the load balancer
CompartmentID string `json:"compartmentId"`
// The OCID of the load balancer
ID string `json:"id"`
// An array of IP addresses
IPAddresses []IP `json:"ipAddresses"`
// Whether the load balancer has a VCN-local (private) IP address
Private bool `json:"isPrivate"`
// The current state of the instance.
// CREATING | ACTIVE
// FAILED | DELETING | DELETED
LifeCycleState string `json:"lifecycleState"`
// A mapping of strings to Listener objects
Listeners map[string]Listener `json:"listeners"`
// A template that determines the total pre-provisioned bandwidth
ShapeName string `json:"shapeName"` // HTTP or TCP
// An array of subnet OCIDs
SubnetIDs []string `json:"subnetIds"`
// The date and time the instance was created (RFC3339)
TimeCreated string `json:"timeCreated"`
}
LoadBalancer represents the listener's configuration: https://docs.us-phoenix-1.oraclecloud.com/api/#/en/loadbalancer/20170115/LoadBalancer/
type SSLConfiguration ¶
type SSLConfiguration struct {
CertName string `json:"certificateName"`
VerifyDepth int `json:"verifyDepth"`
VerifyPeer bool `json:"verifyPeerCertificate"`
}
SSLConfiguration for the struct within the Listener
type SessionPersistenceConfiguration ¶
type SessionPersistenceConfiguration struct {
CookieName string `json:"cookieName"`
DisableFallback bool `json:"disableFallback"`
}
SessionPersistenceConfiguration for the struct within the BackendSet