model

package
v0.0.0-...-ef16b87 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	InternetAddressType = AddressType("internet")
	IntranetAddressType = AddressType("intranet")
)
View Source
const (
	IPv4      = AddressIPVersionType("ipv4")
	IPv6      = AddressIPVersionType("ipv6")
	DualStack = AddressIPVersionType("dualstack")
)
View Source
const (
	OnFlag  = FlagType("on")
	OffFlag = FlagType("off")
)
View Source
const (
	HTTP  = "http"
	HTTPS = "https"
	TCP   = "tcp"
	UDP   = "udp"
)
View Source
const (
	ECSBackendType = "ecs"
	ENIBackendType = "eni"
)
View Source
const (
	RecordTypeA     = "A"
	RecordTypeAAAA  = "AAAA"
	RecordTypeCNAME = "CNAME"
	RecordTypeTXT   = "TXT"
	RecordTypePTR   = "PTR"
	RecordTypeSRV   = "SRV"
)
View Source
const (
	RouteMaxQueryRouteEntry  = 100
	RouteNextHopTypeInstance = "Instance"
	RouteEntryTypeCustom     = "Custom"
)
View Source
const ConsoleProtection = ModificationProtectionType("ConsoleProtection")
View Source
const ModificationProtectionReason = "managed.by.ack"
View Source
const PayByBandwidth = InternetChargeType("paybybandwidth")
View Source
const S1Small = "slb.s1.small"
View Source
const Stopped = ListenerStatus("stopped")

Variables

View Source
var DEFAULT_PREFIX = "k8s"

DEFAULT_PREFIX default prefix for listener

View Source
var FORMAT_ERROR = "ListenerName Format Error: k8s/${port}/${service}/${namespace}/${clusterid} format is expected"

Functions

This section is empty.

Types

type AddressIPVersionType

type AddressIPVersionType string

type AddressType

type AddressType string

type BackendAttribute

type BackendAttribute struct {
	IsUserManaged bool
	NodeName      *string

	Description string `json:"description"`
	ServerId    string `json:"serverId"`
	ServerIp    string `json:"serverIp"`
	Weight      int    `json:"weight"`
	Port        int    `json:"port"`
	Type        string `json:"type"`
}

type CertAttribute

type CertAttribute struct {
	CreateTimeStamp     int64
	ExpireTimeStamp     int64
	ServerCertificateId string
	CommonName          string // The domain name of the certificate.
}

type CertificateInfo

type CertificateInfo struct {
	CommonName      string `json:"CommonName" xml:"CommonName"`
	CertName        string `json:"CertName" xml:"CertName"`
	Issuer          string `json:"Issuer" xml:"Issuer"`
	Algorithm       string `json:"Algorithm" xml:"Algorithm"`
	CertIdentifier  string `json:"CertIdentifier" xml:"CertIdentifier"`
	KeySize         int    `json:"KeySize" xml:"KeySize"`
	BeforeDate      int64  `json:"BeforeDate" xml:"BeforeDate"`
	Sha2            string `json:"Sha2" xml:"Sha2"`
	SignAlgorithm   string `json:"SignAlgorithm" xml:"SignAlgorithm"`
	AfterDate       int64  `json:"AfterDate" xml:"AfterDate"`
	DomainMatchCert bool   `json:"DomainMatchCert" xml:"DomainMatchCert"`
	Md5             string `json:"Md5" xml:"Md5"`
	SerialNo        string `json:"SerialNo" xml:"SerialNo"`
	Sans            string `json:"Sans" xml:"Sans"`
}

CertificateInfo is a nested struct in cas response

type FlagType

type FlagType string

type InstanceChargeType

type InstanceChargeType string

InstanceChargeType slb instance charge type

func (InstanceChargeType) IsPayByCLCU

func (t InstanceChargeType) IsPayByCLCU() bool

func (InstanceChargeType) IsPayBySpec

func (t InstanceChargeType) IsPayBySpec() bool

type InternetChargeType

type InternetChargeType string

type ListenerAttribute

type ListenerAttribute struct {
	IsUserManaged bool
	NamedKey      *ListenerNamedKey

	// parameters are immutable
	ListenerPort    int
	Description     string
	Status          ListenerStatus
	ListenerForward FlagType

	VGroupName string
	VGroupId   string

	// parameters can be modified by annotation
	// values of these parameters can not be set to the default value, no need to use ptr type
	Protocol                   string
	Bandwidth                  int // values: -1 or 1~5120
	Scheduler                  string
	CertId                     string
	TLSCipherPolicy            string
	ForwardPort                int
	EnableHttp2                FlagType
	EnableProxyProtocolV2      *bool
	StickySession              FlagType
	StickySessionType          string
	Cookie                     string
	CookieTimeout              int // values: 1~86400
	XForwardedFor              FlagType
	XForwardedForProto         FlagType
	XForwardedForSLBPort       FlagType
	XForwardedForClientSrcPort FlagType
	AclId                      string
	AclType                    string
	AclStatus                  FlagType
	ConnectionDrain            FlagType
	ConnectionDrainTimeout     int // values: 10~900
	IdleTimeout                int // values: 1~60
	RequestTimeout             int // values: 1~180, http & https
	EstablishedTimeout         int // values: 10~900, tcp
	HealthCheckConnectPort     int
	HealthCheckInterval        int      // values: 1~50
	HealthyThreshold           int      // values: 2~10
	UnhealthyThreshold         int      // values: 2~10
	HealthCheckType            string   // tcp
	HealthCheckConnectTimeout  int      // tcp & udp values: 1~300
	HealthCheckTimeout         int      // http & https values: 1~300
	HealthCheck                FlagType // http & https
	HealthCheckDomain          string   // tcp & http & https
	HealthCheckURI             string   // tcp & http & https
	HealthCheckHttpCode        string   // tcp & http & https
	HealthCheckMethod          string   // http & https

	// The following parameters can be set to the default value.
	// Use the pointer type to distinguish. If the user does not set the param, the param is nil
	PersistenceTimeout *int

	HealthCheckSwitch FlagType // tcp & udp
}

type ListenerNamedKey

type ListenerNamedKey struct {
	Prefix      string
	CID         string
	Namespace   string
	ServiceName string
	Port        int32
}

NamedKey identify listeners on grouped attributes

func LoadListenerNamedKey

func LoadListenerNamedKey(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 LoadBalancer

type LoadBalancer struct {
	NamespacedName        types.NamespacedName
	LoadBalancerAttribute LoadBalancerAttribute
	Listeners             []ListenerAttribute
	VServerGroups         []VServerGroup
}

LoadBalancer represents a AlibabaCloud LoadBalancer.

func (*LoadBalancer) GetLoadBalancerId

func (l *LoadBalancer) GetLoadBalancerId() string

type LoadBalancerAttribute

type LoadBalancerAttribute struct {
	IsUserManaged bool

	// parameters can be modified by annotation
	// values of these parameters can not be set to the default value, no need to use ptr type
	LoadBalancerName             string
	AddressType                  AddressType
	VSwitchId                    string
	NetworkType                  string
	Bandwidth                    int
	InternetChargeType           InternetChargeType
	InstanceChargeType           InstanceChargeType
	DeleteProtection             FlagType
	ModificationProtectionStatus ModificationProtectionType
	ResourceGroupId              string
	LoadBalancerSpec             LoadBalancerSpecType
	MasterZoneId                 string
	SlaveZoneId                  string
	AddressIPVersion             AddressIPVersionType
	Tags                         []tag.Tag
	Address                      string

	// parameters are immutable
	RegionId                     string
	LoadBalancerId               string
	LoadBalancerStatus           string
	VpcId                        string
	CreateTime                   string
	ModificationProtectionReason string
}

type LoadBalancerSpecType

type LoadBalancerSpecType string

type ModificationProtectionType

type ModificationProtectionType string

type PvtzEndpoint

type PvtzEndpoint struct {
	Rr     string      `json:"Rr,omitempty"`
	Values []PvtzValue `json:"values,omitempty"`
	Type   string      `json:"recordType,omitempty"`
	Ttl    int64       `json:"recordTTL,omitempty"`
}

func (*PvtzEndpoint) ValueEqual

func (e *PvtzEndpoint) ValueEqual(ep *PvtzEndpoint) bool

func (*PvtzEndpoint) ValueString

func (e *PvtzEndpoint) ValueString() string

type PvtzEndpointBuilder

type PvtzEndpointBuilder struct {
	PvtzEndpoint
}

func NewPvtzEndpointBuilder

func NewPvtzEndpointBuilder() PvtzEndpointBuilder

func (*PvtzEndpointBuilder) Build

func (peb *PvtzEndpointBuilder) Build() *PvtzEndpoint

func (*PvtzEndpointBuilder) DeepCopy

func (peb *PvtzEndpointBuilder) DeepCopy() *PvtzEndpointBuilder

func (*PvtzEndpointBuilder) WithRr

func (peb *PvtzEndpointBuilder) WithRr(rr string)

func (*PvtzEndpointBuilder) WithTtl

func (peb *PvtzEndpointBuilder) WithTtl(ttl int64)

func (*PvtzEndpointBuilder) WithType

func (peb *PvtzEndpointBuilder) WithType(recordType string)

func (*PvtzEndpointBuilder) WithValueData

func (peb *PvtzEndpointBuilder) WithValueData(data string)

type PvtzValue

type PvtzValue struct {
	Data     string
	RecordId int64
}

func (*PvtzValue) InVals

func (v *PvtzValue) InVals(vals []PvtzValue) bool

type Route

type Route struct {
	Name            string
	DestinationCIDR string
	ProviderId      string
}

Route external route for node

type VGroupNamedKey

type VGroupNamedKey struct {
	Prefix      string
	CID         string
	Namespace   string
	ServiceName string
	// VGroupPort the port in the vgroup name
	VGroupPort string
}

NamedKey identify listeners on grouped attributes

func LoadVGroupNamedKey

func LoadVGroupNamedKey(key string) (*VGroupNamedKey, error)

func (*VGroupNamedKey) Key

func (n *VGroupNamedKey) Key() string

func (*VGroupNamedKey) String

func (n *VGroupNamedKey) String() string

type VServerGroup

type VServerGroup struct {
	IsUserManaged bool
	NamedKey      *VGroupNamedKey
	ServicePort   v1.ServicePort

	VGroupId     string
	VGroupName   string
	VGroupWeight *int
	Backends     []BackendAttribute
}

func (*VServerGroup) BackendInfo

func (v *VServerGroup) BackendInfo() string

Directories

Path Synopsis
alb

Jump to

Keyboard shortcuts

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