nlb

package
v0.0.0-...-a1c3796 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	InternetAddressType = "Internet"
	IntranetAddressType = "Intranet"
)
View Source
const (
	IPv4      = "ipv4"
	DualStack = "DualStack"
)
View Source
const (
	TCP    = "TCP"
	UDP    = "UDP"
	TCPSSL = "TCPSSL"
)
View Source
const (
	InstanceServerGroupType = ServerGroupType("Instance")
	IpServerGroupType       = ServerGroupType("Ip")
)
View Source
const (
	EcsServerType = ServerType("Ecs")
	EniServerType = ServerType("Eni")
	IpServerType  = ServerType("Ip")
)
View Source
const (
	LoadBalancerTagType = TagResourceType("loadbalancer")
	ServerGroupTagType  = TagResourceType("servergroup")
)
View Source
const ConsoleProtection = ModificationProtectionType("ConsoleProtection")
View Source
const ModificationProtectionReason = "managed.by.ack"
View Source
const NonProtection = ModificationProtectionType("NonProtection")
View Source
const (
	StoppedListenerStatus = ListenerStatus("Stopped")
)

Variables

This section is empty.

Functions

func GetAddressIpVersion

func GetAddressIpVersion(addressIpVersion string) string

func GetAddressType

func GetAddressType(addressType string) string

func GetListenerProtocolType

func GetListenerProtocolType(protocol string) string

Types

type DeletionProtectionConfig

type DeletionProtectionConfig struct {
	Enabled bool
	Reason  string
}

type HealthCheckConfig

type HealthCheckConfig struct {
	HealthCheckEnabled        *bool
	HealthCheckType           string
	HealthCheckConnectPort    int32
	HealthyThreshold          int32
	UnhealthyThreshold        int32
	HealthCheckConnectTimeout int32
	HealthCheckInterval       int32
	HealthCheckDomain         string
	HealthCheckUrl            string
	HealthCheckHttpCode       []string
	HttpCheckMethod           string
}

type ListenerAttribute

type ListenerAttribute struct {
	IsUserManaged   bool
	NamedKey        *ListenerNamedKey
	ServerGroupName string
	ServicePort     *v1.ServicePort

	ListenerProtocol      string
	ListenerPort          int32
	ListenerDescription   string
	ServerGroupId         string
	LoadBalancerId        string
	IdleTimeout           int32 // 1-900
	SecurityPolicyId      string
	CertificateIds        []string // tcpssl
	CaCertificateIds      []string
	CaEnabled             *bool
	ProxyProtocolEnabled  *bool
	ProxyProtocolV2Config ProxyProtocolV2Config
	SecSensorEnabled      *bool
	AlpnEnabled           *bool
	AlpnPolicy            string
	StartPort             *int32 //0-65535
	EndPort               *int32 //0-65535
	Cps                   *int32 //0-1000000

	// auto-generated parameters
	ListenerId string
	ListenerStatus
}

type ListenerNamedKey

type ListenerNamedKey struct {
	NamedKey
	Port     int32
	Protocol string
}

func LoadNLBListenerNamedKey

func LoadNLBListenerNamedKey(key string) (*ListenerNamedKey, error)

func (*ListenerNamedKey) Key

func (n *ListenerNamedKey) Key() string

func (*ListenerNamedKey) String

func (n *ListenerNamedKey) String() string

type ListenerStatus

type ListenerStatus string

type LoadBalancerAttribute

type LoadBalancerAttribute struct {
	IsUserManaged bool

	Name                         string
	AddressType                  string
	AddressIpVersion             string
	IPv6AddressType              string
	VpcId                        string
	ZoneMappings                 []ZoneMapping
	ResourceGroupId              string
	Tags                         []tag.Tag
	SecurityGroupIds             []string
	BandwidthPackageId           *string
	DeletionProtectionConfig     *DeletionProtectionConfig
	ModificationProtectionConfig *ModificationProtectionConfig
	PreserveOnDelete             bool

	// auto-generated parameters
	LoadBalancerId             string
	LoadBalancerStatus         string
	LoadBalancerBusinessStatus string
	DNSName                    string
}

type ModificationProtectionConfig

type ModificationProtectionConfig struct {
	Status ModificationProtectionType
	Reason string
}

type ModificationProtectionType

type ModificationProtectionType string

type NamedKey

type NamedKey struct {
	Prefix      string
	CID         string
	Namespace   string
	ServiceName string
}

func (*NamedKey) IsManagedByService

func (n *NamedKey) IsManagedByService(svc *v1.Service, clusterId string) bool

type NetworkLoadBalancer

type NetworkLoadBalancer struct {
	NamespacedName                  types.NamespacedName
	LoadBalancerAttribute           *LoadBalancerAttribute
	Listeners                       []*ListenerAttribute
	ServerGroups                    []*ServerGroup
	ContainsPotentialReadyEndpoints bool
}

NetworkLoadBalancer represents a AlibabaCloud NetworkLoadBalancer.

func (*NetworkLoadBalancer) GetLoadBalancerId

func (l *NetworkLoadBalancer) GetLoadBalancerId() string

type ProxyProtocolV2Config

type ProxyProtocolV2Config struct {
	PrivateLinkEpIdEnabled  *bool
	PrivateLinkEpsIdEnabled *bool
	VpcIdEnabled            *bool
}

type SGNamedKey

type SGNamedKey struct {
	NamedKey
	Protocol string
	// SGGroupPort the port in the vgroup name
	SGGroupPort string
}

func LoadNLBSGNamedKey

func LoadNLBSGNamedKey(key string) (*SGNamedKey, error)

func (*SGNamedKey) Key

func (n *SGNamedKey) Key() string

func (*SGNamedKey) String

func (n *SGNamedKey) String() string

type ServerGroup

type ServerGroup struct {
	IsUserManaged bool
	NamedKey      *SGNamedKey
	ServicePort   *v1.ServicePort
	Weight        *int

	VPCId                   string
	ServerGroupName         string
	ServerGroupType         ServerGroupType
	ResourceGroupId         string
	AddressIPVersion        string
	Protocol                string
	ConnectionDrainEnabled  *bool
	ConnectionDrainTimeout  int32 // 10-900
	Scheduler               string
	PreserveClientIpEnabled *bool
	HealthCheckConfig       *HealthCheckConfig
	Servers                 []ServerGroupServer
	InitialServers          []ServerGroupServer
	Tags                    []tag.Tag

	// auto-generated parameters
	ServerGroupId string
}

func (*ServerGroup) BackendInfo

func (s *ServerGroup) BackendInfo() string

type ServerGroupServer

type ServerGroupServer struct {
	IsUserManaged bool
	NodeName      *string

	ServerGroupId string
	Description   string
	ServerId      string
	ServerIp      string
	ServerType    ServerType
	Port          int32
	Weight        int32
	ZoneId        string
	Status        string

	TargetRef *v1.ObjectReference
}

type ServerGroupType

type ServerGroupType string

type ServerType

type ServerType string

type TagResourceType

type TagResourceType string

type ZoneMapping

type ZoneMapping struct {
	VSwitchId    string
	ZoneId       string
	IPv4Addr     string
	AllocationId string
}

Jump to

Keyboard shortcuts

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