Documentation ¶
Index ¶
- Constants
- type ClientConfig
- type QingCloudClient
- func (q *QingCloudClient) AllocateEIP(eip *apis.EIP) (*apis.EIP, error)
- func (q *QingCloudClient) CreateBackends(backends []*apis.LoadBalancerBackend) ([]*string, error)
- func (q *QingCloudClient) CreateLB(input *apis.LoadBalancer) (*apis.LoadBalancer, error)
- func (q *QingCloudClient) CreateListener(inputs []*apis.LoadBalancerListener) ([]*apis.LoadBalancerListener, error)
- func (q *QingCloudClient) CreateSecurityGroup(input *apis.SecurityGroup) (*apis.SecurityGroup, error)
- func (q *QingCloudClient) DeleteBackends(ids []*string) error
- func (q *QingCloudClient) DeleteLB(id *string) error
- func (q *QingCloudClient) DeleteListener(lsnid []*string) error
- func (q *QingCloudClient) DeleteSG(sg *string) error
- func (q *QingCloudClient) GetAvaliableEIPs() ([]*apis.EIP, error)
- func (q *QingCloudClient) GetListeners(id []*string) ([]*apis.LoadBalancerListener, error)
- func (q *QingCloudClient) GetLoadBalancerByID(id string) (*apis.LoadBalancer, error)
- func (q *QingCloudClient) GetLoadBalancerByName(name string) (*apis.LoadBalancer, error)
- func (q *QingCloudClient) GetSecurityGroupByName(name string) (*apis.SecurityGroup, error)
- func (i *QingCloudClient) InstancesExist(ids []string) error
- func (q *QingCloudClient) ModifyLB(conf *apis.LoadBalancer) error
- func (q *QingCloudClient) ReleaseEIP(ids []*string) error
- func (q *QingCloudClient) UpdateLB(id *string) error
- type QingCloudClientInterface
Constants ¶
View Source
const ( ResourceNameLoadBalancer = "LoadBalancer" ResourceNameListener = "Listener" ResourceNameBackend = "Backend" ResourceNameSecurityGroup = "SecurityGroup" SGTagResourceType = "security_group" EIPTagResourceType = "eip" )
View Source
const ( DefaultBandWidth = 2 EIPStatusAvailable = "available" AllocateEIPName = "k8s_lb_allocate_eip" )
View Source
const ( QingCloudLBIPPrefix = "198.19" DefaultNodeNum = 2 DefaultMode = 1 DefaultLBType = 0 )
View Source
const (
DefaultSgName = "k8s_lb_default_sg"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientConfig ¶ added in v1.4.6
type QingCloudClient ¶ added in v1.4.6
type QingCloudClient struct { InstanceService *qcservice.InstanceService LBService *qcservice.LoadBalancerService EIPService *qcservice.EIPService Config *ClientConfig // contains filtered or unexported fields }
QingCloud is the main entry of all interface
func (*QingCloudClient) AllocateEIP ¶ added in v1.4.6
func (*QingCloudClient) CreateBackends ¶ added in v1.4.6
func (q *QingCloudClient) CreateBackends(backends []*apis.LoadBalancerBackend) ([]*string, error)
need update lb
func (*QingCloudClient) CreateLB ¶ added in v1.4.6
func (q *QingCloudClient) CreateLB(input *apis.LoadBalancer) (*apis.LoadBalancer, error)
func (*QingCloudClient) CreateListener ¶ added in v1.4.6
func (q *QingCloudClient) CreateListener(inputs []*apis.LoadBalancerListener) ([]*apis.LoadBalancerListener, error)
need update lb
func (*QingCloudClient) CreateSecurityGroup ¶ added in v1.4.6
func (q *QingCloudClient) CreateSecurityGroup(input *apis.SecurityGroup) (*apis.SecurityGroup, error)
func (*QingCloudClient) DeleteBackends ¶ added in v1.4.6
func (q *QingCloudClient) DeleteBackends(ids []*string) error
func (*QingCloudClient) DeleteLB ¶ added in v1.4.6
func (q *QingCloudClient) DeleteLB(id *string) error
need update before delete
func (*QingCloudClient) DeleteListener ¶ added in v1.4.6
func (q *QingCloudClient) DeleteListener(lsnid []*string) error
func (*QingCloudClient) DeleteSG ¶ added in v1.4.6
func (q *QingCloudClient) DeleteSG(sg *string) error
func (*QingCloudClient) GetAvaliableEIPs ¶ added in v1.4.6
func (q *QingCloudClient) GetAvaliableEIPs() ([]*apis.EIP, error)
func (*QingCloudClient) GetListeners ¶ added in v1.4.6
func (q *QingCloudClient) GetListeners(id []*string) ([]*apis.LoadBalancerListener, error)
func (*QingCloudClient) GetLoadBalancerByID ¶ added in v1.4.6
func (q *QingCloudClient) GetLoadBalancerByID(id string) (*apis.LoadBalancer, error)
func (*QingCloudClient) GetLoadBalancerByName ¶ added in v1.4.6
func (q *QingCloudClient) GetLoadBalancerByName(name string) (*apis.LoadBalancer, error)
func (*QingCloudClient) GetSecurityGroupByName ¶ added in v1.4.6
func (q *QingCloudClient) GetSecurityGroupByName(name string) (*apis.SecurityGroup, error)
func (*QingCloudClient) InstancesExist ¶ added in v1.4.6
func (i *QingCloudClient) InstancesExist(ids []string) error
func (*QingCloudClient) ModifyLB ¶ added in v1.4.6
func (q *QingCloudClient) ModifyLB(conf *apis.LoadBalancer) error
need update lb
func (*QingCloudClient) ReleaseEIP ¶ added in v1.4.6
func (q *QingCloudClient) ReleaseEIP(ids []*string) error
func (*QingCloudClient) UpdateLB ¶ added in v1.4.6
func (q *QingCloudClient) UpdateLB(id *string) error
type QingCloudClientInterface ¶ added in v1.4.6
type QingCloudClientInterface interface { //LoadBalancer GetLoadBalancerByName(name string) (*apis.LoadBalancer, error) GetLoadBalancerByID(id string) (*apis.LoadBalancer, error) ModifyLB(conf *apis.LoadBalancer) error CreateLB(input *apis.LoadBalancer) (*apis.LoadBalancer, error) DeleteLB(id *string) error UpdateLB(id *string) error //sg GetSecurityGroupByName(name string) (*apis.SecurityGroup, error) //EIP AllocateEIP(eip *apis.EIP) (*apis.EIP, error) GetAvaliableEIPs() ([]*apis.EIP, error) ReleaseEIP(ids []*string) error //backend CreateBackends(backends []*apis.LoadBalancerBackend) ([]*string, error) DeleteBackends(ids []*string) error //listener CreateListener(inputs []*apis.LoadBalancerListener) ([]*apis.LoadBalancerListener, error) GetListeners(id []*string) ([]*apis.LoadBalancerListener, error) DeleteListener(lsnid []*string) error }
func NewQingCloudClient ¶ added in v1.4.6
func NewQingCloudClient(config *ClientConfig, path string) (QingCloudClientInterface, error)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.