eip

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultBandWidth = 2

	EIPStatusAvailable = "available"
	AllocateEIPName    = "k8s_lb_allocate_eip"
	ResourceNameEIP    = "EIP"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type EIP

type EIP struct {
	Name        string
	ID          string
	Address     string
	Status      string
	Bandwidth   int
	BillingMode string
}

func (*EIP) ToQingCloudEIP added in v1.3.2

func (e *EIP) ToQingCloudEIP() *qcservice.EIP

type EIPHelper

type EIPHelper interface {
	GetEIPByID(id string) (*EIP, error)
	GetEIPByAddr(addr string) (*EIP, error)
	ReleaseEIP(id string) error
	GetAvaliableOrAllocateEIP() (*EIP, error)
	AllocateEIP() (*EIP, error)
	GetAvaliableEIPs() ([]*EIP, error)
}

func NewEIPHelperOfQingCloud

func NewEIPHelperOfQingCloud(opt NewEIPHelperOfQingCloudOption) EIPHelper

NewEIPHelperOfQingCloud create a eip helper of qingcloud

type NewEIPHelperOfQingCloudOption

type NewEIPHelperOfQingCloudOption struct {
	JobAPI *qcservice.JobService
	EIPAPI *qcservice.EIPService
	TagAPI *qcservice.TagService
	TagIDs []string
	UserID string
}

Jump to

Keyboard shortcuts

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