Documentation ¶
Index ¶
- Variables
- type AddBackendServersArgs
- type BackendServer
- type BackendServerStatus
- type Client
- func (c *Client) AddBackendServers(args *AddBackendServersArgs) error
- func (c *Client) CreateHTTPListener(args *CreateHTTPListenerArgs) (err error)
- func (c *Client) CreateLoadBalancer(args *CreateLoadBalancerArgs) (*CreateLoadBalancerResponse, error)
- func (c *Client) CreateTCPListener(args *CreateTCPListenerArgs) (err error)
- func (c *Client) CreateUDPListener(args *CreateUDPListenerArgs) (err error)
- func (c *Client) DeleteListeners(args *DeleteListenersArgs) error
- func (c *Client) DeleteLoadBalancer(args *DeleteLoadBalancerArgs) error
- func (c *Client) DescribeBackendServers(args *DescribeBackendServersArgs) ([]BackendServer, error)
- func (c *Client) DescribeLoadBalancers(args *DescribeLoadBalancersArgs) ([]LoadBalancer, error)
- func (c *Client) DescribeTCPListener(args *DescribeTCPListenerArgs) ([]TCPListener, error)
- func (c *Client) DescribeUDPListener(args *DescribeUDPListenerArgs) ([]UDPListener, error)
- func (c *Client) GetURL(version string, params map[string]string) string
- func (c *Client) RemoveBackendServers(args *RemoveBackendServersArgs) error
- func (c *Client) UpdateBackendServers(args *UpdateBackendServersArgs) error
- func (c *Client) UpdateLoadBalancer(args *UpdateLoadBalancerArgs) error
- func (c *Client) UpdateTCPListener(args *UpdateTCPListenerArgs) error
- func (c *Client) UpdateUDPListener(args *UpdateUDPListenerArgs) error
- type Config
- type CreateHTTPListenerArgs
- type CreateHTTPSListenerArgs
- type CreateLoadBalancerArgs
- type CreateLoadBalancerResponse
- type CreateTCPListenerArgs
- type CreateUDPListenerArgs
- type DeleteListenersArgs
- type DeleteLoadBalancerArgs
- type DescribeBackendServersArgs
- type DescribeBackendServersResponse
- type DescribeLoadBalancersArgs
- type DescribeLoadBalancersResponse
- type DescribeTCPListenerArgs
- type DescribeTCPListenerResponse
- type DescribeUDPListenerArgs
- type DescribeUDPListenerResponse
- type HTTPListener
- type HTTPSListener
- type LoadBalancer
- type RemoveBackendServersArgs
- type TCPListener
- type UDPListener
- type UpdateBackendServersArgs
- type UpdateLoadBalancerArgs
- type UpdateTCPListenerArgs
- type UpdateUDPListenerArgs
Constants ¶
This section is empty.
Variables ¶
var Endpoint = map[string]string{
"bj": "blb.bj.baidubce.com",
"gz": "blb.gz.baidubce.com",
"su": "blb.su.baidubce.com",
"hk": "blb.hkg.baidubce.com",
"bd": "blb.bd.baidubce.com",
}
Endpoint contains all endpoints of BLB.
Functions ¶
This section is empty.
Types ¶
type AddBackendServersArgs ¶
type AddBackendServersArgs struct { LoadBalancerId string `json:"-"` BackendServerList []BackendServer `json:"backendServerList"` }
AddBackendServersArgs is the args to add BackendServer
type BackendServer ¶
type BackendServer struct { InstanceId string `json:"instanceId"` Weight int `json:"weight,omitempty"` }
BackendServer define BackendServer
type BackendServerStatus ¶
type BackendServerStatus struct { InstanceId string `json:"instanceId"` Weight int `json:"weight"` Status string `json:"status"` }
BackendServerStatus define BackendServer Status
type Client ¶
Client is the BLB client
func (*Client) AddBackendServers ¶
func (c *Client) AddBackendServers(args *AddBackendServersArgs) error
AddBackendServers add BackendServers
func (*Client) CreateHTTPListener ¶
func (c *Client) CreateHTTPListener(args *CreateHTTPListenerArgs) (err error)
CreateHTTPListener create HTTP listener on loadbalancer
func (*Client) CreateLoadBalancer ¶
func (c *Client) CreateLoadBalancer(args *CreateLoadBalancerArgs) (*CreateLoadBalancerResponse, error)
CreateLoadBalancer Create a loadbalancer
func (*Client) CreateTCPListener ¶
func (c *Client) CreateTCPListener(args *CreateTCPListenerArgs) (err error)
CreateTCPListener create TCP listener on loadbalancer
func (*Client) CreateUDPListener ¶
func (c *Client) CreateUDPListener(args *CreateUDPListenerArgs) (err error)
CreateUDPListener create UDP listener on loadbalancer
func (*Client) DeleteListeners ¶
func (c *Client) DeleteListeners(args *DeleteListenersArgs) error
DeleteListeners delete a Listener
func (*Client) DeleteLoadBalancer ¶
func (c *Client) DeleteLoadBalancer(args *DeleteLoadBalancerArgs) error
DeleteLoadBalancer delete a loadbalancer
func (*Client) DescribeBackendServers ¶
func (c *Client) DescribeBackendServers(args *DescribeBackendServersArgs) ([]BackendServer, error)
DescribeBackendServers describe BackendServers
func (*Client) DescribeLoadBalancers ¶
func (c *Client) DescribeLoadBalancers(args *DescribeLoadBalancersArgs) ([]LoadBalancer, error)
DescribeLoadBalancers Describe loadbalancers
func (*Client) DescribeTCPListener ¶
func (c *Client) DescribeTCPListener(args *DescribeTCPListenerArgs) ([]TCPListener, error)
DescribeTCPListener Describe TCPListener
func (*Client) DescribeUDPListener ¶
func (c *Client) DescribeUDPListener(args *DescribeUDPListenerArgs) ([]UDPListener, error)
DescribeUDPListeners Describe UDPListeners
func (*Client) RemoveBackendServers ¶
func (c *Client) RemoveBackendServers(args *RemoveBackendServersArgs) error
RemoveBackendServers remove a BackendServers
func (*Client) UpdateBackendServers ¶
func (c *Client) UpdateBackendServers(args *UpdateBackendServersArgs) error
UpdateBackendServers update BackendServers
func (*Client) UpdateLoadBalancer ¶
func (c *Client) UpdateLoadBalancer(args *UpdateLoadBalancerArgs) error
UpdateLoadBalancer update a loadbalancer
func (*Client) UpdateTCPListener ¶
func (c *Client) UpdateTCPListener(args *UpdateTCPListenerArgs) error
UpdateTCPListener update a TCPListener
func (*Client) UpdateUDPListener ¶
func (c *Client) UpdateUDPListener(args *UpdateUDPListenerArgs) error
UpdateUDPListener update a UDPListener
type CreateHTTPListenerArgs ¶
type CreateHTTPListenerArgs struct { LoadBalancerId string `json:"-"` ListenerPort int `json:"listenerPort"` BackendPort int `json:"backendPort"` Scheduler string `json:"scheduler"` KeepSession bool `json:"keepSession,omitempty"` KeepSessionType string `json:"keepSessionType,omitempty"` KeepSessionDuration int `json:"keepSessionDuration,omitempty"` KeepSessionCookieName int `json:"keepSessionCookieName,omitempty"` XForwardFor bool `json:"xForwardFor,omitempty"` HealthCheckType string `json:"healthCheckType,omitempty"` HealthCheckPort int `json:"healthCheckPort,omitempty"` HealthCheckURI string `json:"healthCheckURI,omitempty"` HealthCheckTimeoutInSecond int `json:"healthCheckTimeoutInSecond,omitempty"` HealthCheckInterval int `json:"healthCheckInterval,omitempty"` UnhealthyThreshold int `json:"unhealthyThreshold,omitempty"` HealthyThreshold int `json:"healthyThreshold,omitempty"` HealthCheckNormalStatus string `json:"healthCheckNormalStatus,omitempty"` ServerTimeout int `json:"serverTimeout,omitempty"` RedirectPort int `json:"redirectPort,omitempty"` }
CreateHTTPListenerArgs is the args to create HTTPListener
type CreateHTTPSListenerArgs ¶
type CreateHTTPSListenerArgs struct { LoadBalancerId string `json:"-"` ListenerPort int `json:"listenerPort"` BackendPort int `json:"backendPort"` Scheduler string `json:"scheduler"` KeepSession bool `json:"keepSession,omitempty"` KeepSessionType string `json:"keepSessionType,omitempty"` KeepSessionDuration int `json:"keepSessionDuration,omitempty"` KeepSessionCookieName int `json:"keepSessionCookieName,omitempty"` XForwardFor bool `json:"xForwardFor,omitempty"` HealthCheckType string `json:"healthCheckType,omitempty"` HealthCheckPort int `json:"healthCheckPort,omitempty"` HealthCheckURI string `json:"healthCheckURI,omitempty"` HealthCheckTimeoutInSecond int `json:"healthCheckTimeoutInSecond,omitempty"` HealthCheckInterval int `json:"healthCheckInterval,omitempty"` UnhealthyThreshold int `json:"unhealthyThreshold,omitempty"` HealthyThreshold int `json:"healthyThreshold,omitempty"` HealthCheckNormalStatus string `json:"healthCheckNormalStatus,omitempty"` ServerTimeout int `json:"serverTimeout,omitempty"` CertIds []int `json:"certIds,omitempty"` Ie6Compatible bool `json:"ie6Compatible"` }
CreateHTTPSListenerArgs is the args to create HTTPSListener
type CreateLoadBalancerArgs ¶
type CreateLoadBalancerArgs struct { Desc string `json:"desc,omitempty"` Name string `json:"name,omitempty"` VpcID string `json:"vpcId,omitempty"` SubnetID string `json:"subnetId,omitempty"` AllocateVip bool `json:"allocateVip,omitempty"` }
CreateLoadBalancerArgs create blb args
type CreateLoadBalancerResponse ¶
type CreateLoadBalancerResponse struct { LoadBalancerId string `json:"blbId"` Address string `json:"address"` Desc string `json:"desc,omitempty"` Name string `json:"name"` }
CreateLoadBalancerResponse is the response of CreateLoadBalancer
type CreateTCPListenerArgs ¶
type CreateTCPListenerArgs struct { LoadBalancerId string `json:"-"` ListenerPort int `json:"listenerPort"` BackendPort int `json:"backendPort"` Scheduler string `json:"scheduler"` HealthCheckTimeoutInSecond int `json:"healthCheckTimeoutInSecond,omitempty"` HealthCheckInterval int `json:"healthCheckInterval,omitempty"` UnhealthyThreshold int `json:"unhealthyThreshold,omitempty"` HealthyThreshold int `json:"healthyThreshold,omitempty"` }
CreateTCPListenerArgs is the args to create TCPListener
type CreateUDPListenerArgs ¶
type CreateUDPListenerArgs struct { LoadBalancerId string `json:"-"` ListenerPort int `json:"listenerPort"` BackendPort int `json:"backendPort"` Scheduler string `json:"scheduler"` HealthCheckTimeoutInSecond int `json:"healthCheckTimeoutInSecond,omitempty"` HealthCheckInterval int `json:"healthCheckInterval,omitempty"` UnhealthyThreshold int `json:"unhealthyThreshold,omitempty"` HealthyThreshold int `json:"healthyThreshold,omitempty"` HealthCheckString string `json:"healthCheckString"` }
CreateUDPListenerArgs is the args to create UDPListener
type DeleteListenersArgs ¶
type DeleteListenersArgs struct { LoadBalancerId string `json:"-"` PortList []int `json:"portList"` }
DeleteListenersArgs is the args to DeleteListeners
type DeleteLoadBalancerArgs ¶
type DeleteLoadBalancerArgs struct {
LoadBalancerId string `json:"blbId"`
}
DeleteLoadBalancerArgs is the args to delete LoadBalancer
type DescribeBackendServersArgs ¶
type DescribeBackendServersArgs struct {
LoadBalancerId string `json:"-"`
}
DescribeBackendServersArgs is the args to describe BackendServer
type DescribeBackendServersResponse ¶
type DescribeBackendServersResponse struct { Marker string `json:"marker"` IsTruncated bool `json:"isTruncated"` NextMarker string `json:"nextMarker"` MaxKeys int `json:"maxKeys"` BackendServerList []BackendServer `json:"backendServerList"` }
DescribeBackendServersResponse is the response of DescribeBackendServers
type DescribeLoadBalancersArgs ¶
type DescribeLoadBalancersArgs struct { LoadBalancerId string LoadBalancerName string BCCId string Address string ExactlyMatch bool }
DescribeLoadBalancersArgs is the args to describe LoadBalancer
type DescribeLoadBalancersResponse ¶
type DescribeLoadBalancersResponse struct { Marker string `json:"marker"` IsTruncated bool `json:"isTruncated"` NextMarker string `json:"nextMarker"` MaxKeys int `json:"maxKeys"` BLBList []LoadBalancer `json:"blbList"` }
DescribeLoadBalancersResponse is the response of DescribeLoadBalancers
type DescribeTCPListenerArgs ¶
DescribeTCPListenerArgs is the args to describe TCPListener
type DescribeTCPListenerResponse ¶
type DescribeTCPListenerResponse struct { Marker string `json:"marker"` IsTruncated bool `json:"isTruncated"` NextMarker string `json:"nextMarker"` MaxKeys int `json:"maxKeys"` TCPListenerList []TCPListener `json:"listenerList"` }
DescribeTCPListenerResponse is the response of DescribeTCPListener
type DescribeUDPListenerArgs ¶
DescribeUDPListenerArgs is the args to describe UDPListener
type DescribeUDPListenerResponse ¶
type DescribeUDPListenerResponse struct { Marker string `json:"marker"` IsTruncated bool `json:"isTruncated"` NextMarker string `json:"nextMarker"` MaxKeys int `json:"maxKeys"` UDPListenerList []UDPListener `json:"listenerList"` }
DescribeUDPListenerResponse is the response of DescribeUDPListener
type HTTPListener ¶
type HTTPListener struct { ListenerPort int `json:"listenerPort"` BackendPort int `json:"backendPort"` Scheduler string `json:"scheduler"` KeepSession bool `json:"keepSession"` KeepSessionType string `json:"keepSessionType"` KeepSessionDuration int `json:"keepSessionDuration"` KeepSessionCookieName int `json:"keepSessionCookieName"` XForwardFor bool `json:"xForwardFor"` HealthCheckType string `json:"healthCheckType"` HealthCheckPort int `json:"healthCheckPort"` HealthCheckURI string `json:"healthCheckURI"` HealthCheckTimeoutInSecond int `json:"healthCheckTimeoutInSecond"` HealthCheckInterval int `json:"healthCheckInterval"` UnhealthyThreshold int `json:"unhealthyThreshold"` HealthyThreshold int `json:"healthyThreshold"` HealthCheckNormalStatus string `json:"healthCheckNormalStatus"` ServerTimeout int `json:"serverTimeout"` RedirectPort int `json:"redirectPort"` }
HTTPListener define HTTPListener
type HTTPSListener ¶
type HTTPSListener struct { ListenerPort int `json:"listenerPort"` BackendPort int `json:"backendPort"` Scheduler string `json:"scheduler"` KeepSession bool `json:"keepSession"` KeepSessionType string `json:"keepSessionType"` KeepSessionDuration int `json:"keepSessionDuration"` KeepSessionCookieName int `json:"keepSessionCookieName"` XForwardFor bool `json:"xForwardFor"` HealthCheckType string `json:"healthCheckType"` HealthCheckPort int `json:"healthCheckPort"` HealthCheckURI string `json:"healthCheckURI"` HealthCheckTimeoutInSecond int `json:"healthCheckTimeoutInSecond"` HealthCheckInterval int `json:"healthCheckInterval"` UnhealthyThreshold int `json:"unhealthyThreshold"` HealthyThreshold int `json:"healthyThreshold"` HealthCheckNormalStatus string `json:"healthCheckNormalStatus"` ServerTimeout int `json:"serverTimeout"` CertIds []string `json:"certIds"` Ie6Compatible bool `json:"ie6Compatible"` }
HTTPSListener define HTTPSListener
type LoadBalancer ¶
type LoadBalancer struct { BlbId string `json:"blbId"` Name string `json:"name"` Desc string `json:"desc"` Address string `json:"address"` Status string `json:"status"` PublicIp string `json:"publicIp"` }
LoadBalancer define LoadBalancer
type RemoveBackendServersArgs ¶
type RemoveBackendServersArgs struct { LoadBalancerId string `json:"-"` BackendServerList []string `json:"backendServerList"` }
RemoveBackendServersArgs is the argds to remove BackendServer
type TCPListener ¶
type TCPListener struct { ListenerPort int `json:"listenerPort"` BackendPort int `json:"backendPort"` Scheduler string `json:"scheduler"` HealthCheckTimeoutInSecond int `json:"healthCheckTimeoutInSecond"` HealthCheckInterval int `json:"healthCheckInterval"` UnhealthyThreshold int `json:"unhealthyThreshold"` HealthyThreshold int `json:"healthyThreshold"` }
TCPListener define TCPListener
type UDPListener ¶
type UDPListener struct { ListenerPort int `json:"listenerPort"` BackendPort int `json:"backendPort"` Scheduler string `json:"scheduler"` HealthCheckTimeoutInSecond int `json:"healthCheckTimeoutInSecond"` HealthCheckInterval int `json:"healthCheckInterval"` UnhealthyThreshold int `json:"unhealthyThreshold"` HealthyThreshold int `json:"healthyThreshold"` HealthCheckString string `json:"healthCheckString"` }
UDPListener define UDPListener
type UpdateBackendServersArgs ¶
type UpdateBackendServersArgs struct { LoadBalancerId string `json:"-"` BackendServerList []BackendServer `json:"backendServerList"` }
UpdateBackendServersArgs is the args to update the BackendServer
type UpdateLoadBalancerArgs ¶
type UpdateLoadBalancerArgs struct { LoadBalancerId string `json:"blbId"` Desc string `json:"desc"` Name string `json:"name,omitempty"` }
UpdateLoadBalancerArgs is the args to UpdateLoadBalancer
type UpdateTCPListenerArgs ¶
type UpdateTCPListenerArgs struct { LoadBalancerId string `json:"-"` ListenerPort int `json:"-"` BackendPort int `json:"backendPort"` Scheduler string `json:"scheduler"` HealthCheckTimeoutInSecond int `json:"healthCheckTimeoutInSecond,omitempty"` HealthCheckInterval int `json:"healthCheckInterval,omitempty"` UnhealthyThreshold int `json:"unhealthyThreshold,omitempty"` HealthyThreshold int `json:"healthyThreshold,omitempty"` }
UpdateTCPListenerArgs is the args to UpdateTCPListener
type UpdateUDPListenerArgs ¶
type UpdateUDPListenerArgs struct { LoadBalancerId string `json:"-"` ListenerPort int `json:"-"` BackendPort int `json:"backendPort"` Scheduler string `json:"scheduler"` HealthCheckTimeoutInSecond int `json:"healthCheckTimeoutInSecond,omitempty"` HealthCheckInterval int `json:"healthCheckInterval,omitempty"` UnhealthyThreshold int `json:"unhealthyThreshold,omitempty"` HealthyThreshold int `json:"healthyThreshold,omitempty"` HealthCheckString string `json:"healthCheckString"` }
UpdateUDPListenerArgs is the args to update UDPListener