Documentation
¶
Index ¶
- Variables
- type AddBackendServersArgs
- type BackendServer
- type BackendServerStatus
- type Client
- func (c *Client) AddBackendServers(args *AddBackendServersArgs, option *bce.SignOption) error
- func (c *Client) CreateHTTPListener(args *CreateHTTPListenerArgs, option *bce.SignOption) (err error)
- func (c *Client) CreateLoadBalancer(args *CreateLoadBalancerArgs, option *bce.SignOption) (*CreateLoadBalancerResponse, error)
- func (c *Client) CreateTCPListener(args *CreateTCPListenerArgs, option *bce.SignOption) (err error)
- func (c *Client) CreateUDPListener(args *CreateUDPListenerArgs, option *bce.SignOption) (err error)
- func (c *Client) DeleteListeners(args *DeleteListenersArgs, option *bce.SignOption) error
- func (c *Client) DeleteLoadBalancer(args *DeleteLoadBalancerArgs, option *bce.SignOption) error
- func (c *Client) DescribeBackendServers(args *DescribeBackendServersArgs, option *bce.SignOption) ([]BackendServer, error)
- func (c *Client) DescribeLoadBalancers(args *DescribeLoadBalancersArgs, option *bce.SignOption) ([]LoadBalancer, error)
- func (c *Client) DescribeTCPListener(args *DescribeTCPListenerArgs, option *bce.SignOption) ([]TCPListener, error)
- func (c *Client) DescribeUDPListener(args *DescribeUDPListenerArgs, option *bce.SignOption) ([]UDPListener, error)
- func (c *Client) GetURL(version string, params map[string]string) string
- func (c *Client) RemoveBackendServers(args *RemoveBackendServersArgs, option *bce.SignOption) error
- func (c *Client) UpdateBackendServers(args *UpdateBackendServersArgs, option *bce.SignOption) error
- func (c *Client) UpdateLoadBalancer(args *UpdateLoadBalancerArgs, option *bce.SignOption) error
- func (c *Client) UpdateTCPListener(args *UpdateTCPListenerArgs, option *bce.SignOption) error
- func (c *Client) UpdateUDPListener(args *UpdateUDPListenerArgs, option *bce.SignOption) error
- type CreateHTTPListenerArgs
- 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 Baidu Cloud BCC.
Functions ¶
This section is empty.
Types ¶
type AddBackendServersArgs ¶
type AddBackendServersArgs struct {
LoadBalancerId string `json:"-"`
BackendServerList []BackendServer `json:"backendServerList"`
}
type BackendServer ¶
type BackendServerStatus ¶
type Client ¶
Client is the BLB client implemention for Baidu Cloud BLB API.
func NewBLBClient ¶
func (*Client) AddBackendServers ¶
func (c *Client) AddBackendServers(args *AddBackendServersArgs, option *bce.SignOption) error
func (*Client) CreateHTTPListener ¶
func (c *Client) CreateHTTPListener(args *CreateHTTPListenerArgs, option *bce.SignOption) (err error)
CreateHTTPListener create HTTP listener on loadbalancer
You can read doc at https://cloud.baidu.com/doc/BLB/API.html#.D7.A3.9B.E1.45.BD.9E.FA.B0.2F.60.12.B3.39.E8.9D
func (*Client) CreateLoadBalancer ¶
func (c *Client) CreateLoadBalancer(args *CreateLoadBalancerArgs, option *bce.SignOption) (*CreateLoadBalancerResponse, error)
CreateLoadBalancer Create a loadbalancer TODO: args need to validate
func (*Client) CreateTCPListener ¶
func (c *Client) CreateTCPListener(args *CreateTCPListenerArgs, option *bce.SignOption) (err error)
CreateLoadBalancerHTTPListener create HTTP listener on loadbalancer You can read doc at https://cloud.baidu.com/doc/BLB/API.html#.C0.F3.F3.ED.5C.D8.4D.66.19.FF.DA.7A.0F.75.05.7C
func (*Client) CreateUDPListener ¶
func (c *Client) CreateUDPListener(args *CreateUDPListenerArgs, option *bce.SignOption) (err error)
CreateLoadBalancerUDPListener create UDP listener on loadbalancer
You can read doc at https://cloud.baidu.com/doc/BLB/API.html#.D7.A3.9B.E1.45.BD.9E.FA.B0.2F.60.12.B3.39.E8.9D
func (*Client) DeleteListeners ¶
func (c *Client) DeleteListeners(args *DeleteListenersArgs, option *bce.SignOption) error
UpdateUDPListener update a UDPListener
func (*Client) DeleteLoadBalancer ¶
func (c *Client) DeleteLoadBalancer(args *DeleteLoadBalancerArgs, option *bce.SignOption) error
DeleteLoadBalancer delete a loadbalancer
func (*Client) DescribeBackendServers ¶
func (c *Client) DescribeBackendServers(args *DescribeBackendServersArgs, option *bce.SignOption) ([]BackendServer, error)
func (*Client) DescribeLoadBalancers ¶
func (c *Client) DescribeLoadBalancers(args *DescribeLoadBalancersArgs, option *bce.SignOption) ([]LoadBalancer, error)
DescribeLoadBalancers Describe loadbalancers TODO: args need to validate
func (*Client) DescribeTCPListener ¶
func (c *Client) DescribeTCPListener(args *DescribeTCPListenerArgs, option *bce.SignOption) ([]TCPListener, error)
DescribeTCPListener Describe TCPListener TODO: args need to validate
func (*Client) DescribeUDPListener ¶
func (c *Client) DescribeUDPListener(args *DescribeUDPListenerArgs, option *bce.SignOption) ([]UDPListener, error)
DescribeUDPListeners Describe UDPListeners TODO: args need to validate
func (*Client) RemoveBackendServers ¶
func (c *Client) RemoveBackendServers(args *RemoveBackendServersArgs, option *bce.SignOption) error
RemoveBackendServers remove a BackendServers
func (*Client) UpdateBackendServers ¶
func (c *Client) UpdateBackendServers(args *UpdateBackendServersArgs, option *bce.SignOption) error
UpdateBackendServers update BackendServers
func (*Client) UpdateLoadBalancer ¶
func (c *Client) UpdateLoadBalancer(args *UpdateLoadBalancerArgs, option *bce.SignOption) error
UpdateLoadBalancer update a loadbalancer TODO: args need to validate
func (*Client) UpdateTCPListener ¶
func (c *Client) UpdateTCPListener(args *UpdateTCPListenerArgs, option *bce.SignOption) error
UpdateTCPListener update a TCPListener TODO: args need to validate
func (*Client) UpdateUDPListener ¶
func (c *Client) UpdateUDPListener(args *UpdateUDPListenerArgs, option *bce.SignOption) 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"`
}
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"`
}
CreateLoadBalancerArgs create blb args
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"`
}
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"`
}
type DeleteListenersArgs ¶
type DeleteLoadBalancerArgs ¶
type DeleteLoadBalancerArgs struct {
LoadBalancerId string `json:"blbId"`
}
type DescribeBackendServersArgs ¶
type DescribeBackendServersArgs struct {
LoadBalancerId string `json:"-"`
}
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"`
}
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"`
}
type DescribeTCPListenerArgs ¶
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"`
}
type DescribeUDPListenerArgs ¶
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"`
}
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"`
}
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"`
}
type LoadBalancer ¶
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"`
}
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"`
}
type UpdateBackendServersArgs ¶
type UpdateBackendServersArgs struct {
LoadBalancerId string `json:"-"`
BackendServerList []BackendServer `json:"backendServerList"`
}
type UpdateLoadBalancerArgs ¶
type UpdateTCPListenerArgs ¶
type UpdateTCPListenerArgs struct {
LoadBalancerId string `json:"-"`
ListenerPort int `json:"-"`
BackendPort int `json:"backendPort,omitempty"`
Scheduler string `json:"scheduler,omitempty"`
HealthCheckTimeoutInSecond int `json:"healthCheckTimeoutInSecond,omitempty"`
HealthCheckInterval int `json:"healthCheckInterval,omitempty"`
UnhealthyThreshold int `json:"unhealthyThreshold,omitempty"`
HealthyThreshold int `json:"healthyThreshold,omitempty"`
}
type UpdateUDPListenerArgs ¶
type UpdateUDPListenerArgs 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"`
}