executor

package
v1.4.19 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 22, 2023 License: Apache-2.0 Imports: 12 Imported by: 1

Documentation

Index

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 ClientConfig struct {
	IsAPP  bool
	UserID string
	TagIDs []string
}

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 (q *QingCloudClient) AllocateEIP(eip *apis.EIP) (*apis.EIP, error)

func (*QingCloudClient) AssociateEIPsToLB added in v1.4.15

func (q *QingCloudClient) AssociateEIPsToLB(id *string, eips []*string) error

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) DissociateEIPsFromLB added in v1.4.15

func (q *QingCloudClient) DissociateEIPsFromLB(id *string, eips []*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
	AssociateEIPsToLB(id *string, eips []*string) error
	DissociateEIPsFromLB(id *string, eips []*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)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL