Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultLBSecurityGroupRules = []*qcservice.SecurityGroupRule{ { Priority: qcservice.Int(0), Protocol: qcservice.String("icmp"), Action: qcservice.String("accept"), Val1: qcservice.String("8"), Val2: qcservice.String("0"), Val3: nil, }, { Priority: qcservice.Int(1), Protocol: qcservice.String("tcp"), Action: qcservice.String("accept"), Val1: qcservice.String("1"), Val2: qcservice.String("65535"), Val3: nil, }, { Priority: qcservice.Int(1), Protocol: qcservice.String("udp"), Action: qcservice.String("accept"), Val1: qcservice.String("1"), Val2: qcservice.String("65535"), Val3: nil, }, }
Functions ¶
This section is empty.
Types ¶
type QingCloudListenerBackendExecutor ¶
type QingCloudListenerBackendExecutor interface { DeleteBackends(ids ...string) error GetBackendsOfListener(lsnid string) ([]*qcservice.LoadBalancerBackend, error) GetBackendByID(bid string) (*qcservice.LoadBalancerBackend, error) CreateBackends(*qcservice.AddLoadBalancerBackendsInput) error ModifyBackend(id string, weight int, port int) error }
type QingCloudListenerExecutor ¶
type QingCloudListenerExecutor interface { GetListenersOfLB(lbid, prefix string) ([]*qcservice.LoadBalancerListener, error) GetListenerByID(id string) (*qcservice.LoadBalancerListener, error) DeleteListener(lsnid string) error CreateListener(*qcservice.AddLoadBalancerListenersInput) (*qcservice.LoadBalancerListener, error) ModifyListener(id, balanceMode string) error }
type QingCloudLoadBalancerExecutor ¶
type QingCloudLoadBalancerExecutor interface { // LoadQcLoadBalancer use qingcloud api to get lb in cloud, return err if not found GetLoadBalancerByName(name string) (*qcservice.LoadBalancer, error) GetLoadBalancerByID(id string) (*qcservice.LoadBalancer, error) // Start start loadbalancer in qingcloud Start(id string) error // Stop stop loadbalancer in qingcloud Stop(id string) error // CreateQingCloudLB do create a lb in qingcloud Create(input *qcservice.CreateLoadBalancerInput) (*qcservice.LoadBalancer, error) // Resize change the type of lb in qingcloud Resize(id string, newtype int) error Modify(input *qcservice.ModifyLoadBalancerAttributesInput) error // AssociateEipToLoadBalancer bind the eips to lb in qingcloud AssociateEip(lbid string, eips ...string) error // DissociateEipFromLoadBalancer unbind the eips from lb in qingcloud DissociateEip(lbid string, eips ...string) error // ConfirmQcLoadBalancer make sure each operation is taken effects Confirm(id string) error Delete(id string) error GetLBAPI() *qcservice.LoadBalancerService QingCloudListenerExecutor QingCloudListenerBackendExecutor }
CloudLoadBalancer do stuff on qingcloud
func NewQingCloudLoadBalanceExecutor ¶
func NewQingCloudLoadBalanceExecutor(lbapi *qcservice.LoadBalancerService, jobapi *qcservice.JobService) QingCloudLoadBalancerExecutor
type QingCloudSecurityGroupExecutor ¶
type QingCloudSecurityGroupExecutor interface { // GetSecurityGroupByName return SecurityGroup in qingcloud using name GetSecurityGroupByName(name string) (*qcservice.SecurityGroup, error) //EnsureSecurityGroup will create a SecurityGroup if not exists EnsureSecurityGroup(name string) (*qcservice.SecurityGroup, error) GetSecurityGroupByID(id string) (*qcservice.SecurityGroup, error) GetSgAPI() *qcservice.SecurityGroupService Delete(id string) error CreateSecurityGroup(gName string, rules []*qcservice.SecurityGroupRule) (*qcservice.SecurityGroup, error) }
func NewQingCloudSecurityGroupExecutor ¶
func NewQingCloudSecurityGroupExecutor(sgapi *qcservice.SecurityGroupService) QingCloudSecurityGroupExecutor
Click to show internal directories.
Click to hide internal directories.