clb

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

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, name string) (lbId string, err error)

func CreateListener

func CreateListener(ctx context.Context, region string, req *clb.CreateListenerRequest) (id string, err error)

func DefaultRegion

func DefaultRegion() string

func DefaultVpcId

func DefaultVpcId() string

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 Init

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

func RegisterTargets

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

func Wait

func Wait(ctx context.Context, region, reqId string) 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