clb

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TOTAL_INTERNAL_CLB_QUOTA             = "TOTAL_INTERNAL_CLB_QUOTA"
	TOTAL_TARGET_BIND_QUOTA              = "TOTAL_TARGET_BIND_QUOTA"
	TOTAL_OPEN_CLB_QUOTA                 = "TOTAL_OPEN_CLB_QUOTA"
	TOTAL_LISTENER_QUOTA                 = "TOTAL_LISTENER_QUOTA"
	TOTAL_SNAT_IP_QUOTA                  = "TOTAL_SNAT_IP_QUOTA"
	TOTAL_LISTENER_RULE_QUOTA            = "TOTAL_LISTENER_RULE_QUOTA"
	TOTAL_FULL_PORT_RANGE_LISTENER_QUOTA = "TOTAL_FULL_PORT_RANGE_LISTENER_QUOTA"
	TOTAL_ISP_CLB_QUOTA                  = "TOTAL_ISP_CLB_QUOTA"
)
View Source
const TkePodListenerName = "TKE-DEDICATED-POD"

Variables

This section is empty.

Functions

func ContainsTarget

func ContainsTarget(ctx context.Context, region, lbId string, port int64, protocol string, target Target) (bool, error)

func Create

func Create(ctx context.Context, region, vpcId, extensiveParameters string, num int) (ids []string, err error)

TODO: 支持部分成功

func CreateListener

func CreateListener(ctx context.Context, region, lbId string, port int64, protocol, extensiveParameters string) (id string, err error)

func DefaultRegion

func DefaultRegion() string

func DefaultVpcId

func DefaultVpcId() string

func Delete added in v0.1.13

func Delete(ctx context.Context, region string, lbIds ...string) error

func DeleteListener

func DeleteListener(ctx context.Context, region, lbId, listenerId string) error

func DeleteListenerByPort

func DeleteListenerByPort(ctx context.Context, region, lbId string, port int64, protocol string) (id string, err error)

func DeregisterAllTargets

func DeregisterAllTargets(ctx context.Context, region, lbId, listenerId string) error

func DeregisterTargetsForListener

func DeregisterTargetsForListener(ctx context.Context, region, lbId, listenerId string, targets ...Target) error

func GetClb

func GetClb(ctx context.Context, lbId, region string) (instance *clb.LoadBalancer, err error)

func GetClbExternalAddress

func GetClbExternalAddress(ctx context.Context, lbId, region string) (address string, err error)

func GetClient

func GetClient(region string) *clb.Client

func GetQuota added in v1.1.0

func GetQuota(ctx context.Context, region, id string) (int64, error)

func Init

func Init(secretId, secretKey, region, vpcId, clusterID string)

func IsLbIdNotFoundError added in v0.1.13

func IsLbIdNotFoundError(err error) bool

func RegisterTargets

func RegisterTargets(ctx context.Context, region, lbId, listenerId string, targets ...Target) error

func SyncQuota added in v1.1.0

func SyncQuota(ctx context.Context, region string) (map[string]int64, error)

func Wait

func Wait(ctx context.Context, region, reqId, taskName string) (ids []string, err error)

Types

type BatchTarget

type BatchTarget struct {
	ListenerProtocol string
	ListenerPort     int64
	Target
}

type Listener

type Listener struct {
	Port         int64
	Protocol     string
	ListenerId   string
	ListenerName string
}

func GetListener

func GetListener(ctx context.Context, region, lbId, listenerId string) (lis *Listener, err error)

func GetListenerByPort

func GetListenerByPort(ctx context.Context, region, lbId string, port int64, protocol string) (lis *Listener, err error)

type Target

type Target struct {
	TargetIP   string
	TargetPort int64
}

func DescribeTargets

func DescribeTargets(ctx context.Context, region, lbId, listenerId string) (targets []Target, err error)

func (Target) String

func (t Target) String() string

Jump to

Keyboard shortcuts

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