Documentation ¶
Overview ¶
nolint:golint // stop check lint issues as this file will be refactored
nolint:golint // stop check lint issues as this file will be refactored
nolint:golint // stop check lint issues as this file will be refactored
nolint:golint // stop check lint issues as this file will be refactored
nolint:golint // stop check lint issues as this file will be refactored
nolint:golint // stop check lint issues as this file will be refactored
nolint:golint // stop check lint issues as this file will be refactored
Index ¶
- Constants
- func CheckNodeHealth(node *v1.Node) (bool, error)
- func DecodeBody(resp *http.Response, out interface{}) error
- func DoRequest(service *ServiceClient, throttle flowcontrol.RateLimiter, r *request) (*http.Response, error)
- func GetHealthCheckPort(service *v1.Service) *v1.ServicePort
- func GetListenerName(service *v1.Service) string
- func GetOldListenerName(service *v1.Service) string
- func GetSessionAffinityOptions(service *v1.Service) string
- func GetSessionAffinityType(service *v1.Service) string
- func IsPodActive(p v1.Pod) bool
- func IsValidBandwidth(bandwidth int) bool
- func IsValidDesc(desc string) bool
- func IsValidName(name string) bool
- func NewRequest(method, url string, headersIn map[string]string, obj interface{}) *request
- type AccessInfo
- type AllowAddressPair
- type AsyncJobResp
- type Basic
- type CloudProvider
- func (h *CloudProvider) Clusters() (cloudprovider.Clusters, bool)
- func (h *CloudProvider) EnsureLoadBalancer(ctx context.Context, clusterName string, service *v1.Service, nodes []*v1.Node) (*v1.LoadBalancerStatus, error)
- func (h *CloudProvider) EnsureLoadBalancerDeleted(ctx context.Context, clusterName string, service *v1.Service) error
- func (h *CloudProvider) ExternalID(ctx context.Context, instance types.NodeName) (string, error)
- func (h *CloudProvider) GetLoadBalancer(ctx context.Context, clusterName string, service *v1.Service) (status *v1.LoadBalancerStatus, exists bool, err error)
- func (h *CloudProvider) GetLoadBalancerName(ctx context.Context, clusterName string, service *v1.Service) string
- func (h *CloudProvider) HasClusterID() bool
- func (h *CloudProvider) Initialize(clientBuilder cloudprovider.ControllerClientBuilder, stop <-chan struct{})
- func (h *CloudProvider) Instances() (cloudprovider.Instances, bool)
- func (h *CloudProvider) InstancesV2() (cloudprovider.InstancesV2, bool)
- func (h *CloudProvider) ListClusters(ctx context.Context) ([]string, error)
- func (h *CloudProvider) LoadBalancer() (cloudprovider.LoadBalancer, bool)
- func (h *CloudProvider) Master(ctx context.Context, clusterName string) (string, error)
- func (h *CloudProvider) ProviderName() string
- func (h *CloudProvider) Routes() (cloudprovider.Routes, bool)
- func (h *CloudProvider) UpdateLoadBalancer(ctx context.Context, clusterName string, service *v1.Service, nodes []*v1.Node) error
- func (h *CloudProvider) Zones() (cloudprovider.Zones, bool)
- type CreateEIPOptions
- type DNATRule
- type DNATRuleArr
- type DNATRuleDescription
- type DNATRuleList
- type DNATRuleStatus
- type DedicatedLoadBalancer
- func (d *DedicatedLoadBalancer) EnsureLoadBalancer(ctx context.Context, clusterName string, service *v1.Service, nodes []*v1.Node) (*v1.LoadBalancerStatus, error)
- func (d *DedicatedLoadBalancer) EnsureLoadBalancerDeleted(ctx context.Context, clusterName string, service *v1.Service) error
- func (d *DedicatedLoadBalancer) GetLoadBalancer(ctx context.Context, clusterName string, service *v1.Service) (*v1.LoadBalancerStatus, bool, error)
- func (d *DedicatedLoadBalancer) GetLoadBalancerName(_ context.Context, clusterName string, service *v1.Service) string
- func (d *DedicatedLoadBalancer) UpdateLoadBalancer(ctx context.Context, clusterName string, service *v1.Service, nodes []*v1.Node) error
- type DeleteFunc
- type DeleteFuncWithObj
- type ELB
- type ELBAlgorithm
- type ELBClient
- func (e *ELBClient) AsyncCreateMembers(listenerID string, memberConf []*Member) (*JobResp, error)
- func (e *ELBClient) AsyncDeleteMembers(listenerID string, memDel *MembersDel) (*JobResp, error)
- func (e *ELBClient) CreateHealthCheck(healthConf *HealthCheck) (*HealthCheckRsp, error)
- func (e *ELBClient) CreateListener(listenerConf *Listener) (*ListenerRsp, *ErrorRsp, error)
- func (e *ELBClient) CreateLoadBalancer(elbConf *ELB) (string, error)
- func (e *ELBClient) DeleteHealthCheck(healthcheckID string) error
- func (e *ELBClient) DeleteListener(listenerID string) error
- func (e *ELBClient) DeleteLoadBalancer(loadbalancerID string) error
- func (e *ELBClient) DeleteMembers(listenerID string) error
- func (e *ELBClient) DeregisterInstancesFromListener(listenerID string, memDel *MembersDel) error
- func (e *ELBClient) GetHealthCheck(healthcheckID string) (*HealthCheckDetail, *ErrorRsp, error)
- func (e *ELBClient) GetJobStatus(jobID string) (*AsyncJobResp, error)
- func (e *ELBClient) GetListener(listenerID string) (*ListenerDetail, error)
- func (e *ELBClient) GetLoadBalancer(loadbalancerID string) (*ElbDetail, error)
- func (e *ELBClient) ListListeners(loadbalancerID string) ([]*ListenerDetail, error)
- func (e *ELBClient) ListLoadBalancers(params map[string]string) (*ElbList, error)
- func (e *ELBClient) ListMachines() (*EcsServers, error)
- func (e *ELBClient) ListMembers(listenerID string) ([]*MemDetail, error)
- func (e *ELBClient) ModifyElb(elbConf *ELB) (*ELB, error)
- func (e *ELBClient) Quota() (*Quota, error)
- func (e *ELBClient) RegisterInstancesWithListener(listenerID string, memberConf []*Member) (*AsyncJobResp, error)
- func (e *ELBClient) UpdateHealthCheck(healthConf *HealthCheck, healthcheckID string) (*HealthCheckRsp, error)
- func (e *ELBClient) UpdateListener(listener *Listener, listenerID string) (*ListenerDetail, error)
- func (e *ELBClient) WaitJobComplete(jobID string) error
- func (e *ELBClient) WaitMemberComplete(listenerID string, newMembers []*Member) error
- type ELBCloud
- func (elb *ELBCloud) ELBClient() (*ELBClient, error)
- func (elb *ELBCloud) EnsureLoadBalancer(ctx context.Context, clusterName string, service *v1.Service, hosts []*v1.Node) (*v1.LoadBalancerStatus, error)
- func (elb *ELBCloud) EnsureLoadBalancerDeleted(ctx context.Context, clusterName string, service *v1.Service) error
- func (elb *ELBCloud) GetLoadBalancer(ctx context.Context, clusterName string, service *v1.Service) (status *v1.LoadBalancerStatus, exists bool, err error)
- func (elb *ELBCloud) GetLoadBalancerName(ctx context.Context, clusterName string, service *v1.Service) string
- func (elb *ELBCloud) UpdateLoadBalancer(ctx context.Context, clusterName string, service *v1.Service, hosts []*v1.Node) error
- type ELBProtocol
- type ELBStickySessionType
- type ELBType
- type EcsAddress
- type EcsServers
- type ElbDetail
- type ElbList
- type ElbNum
- type ErrorRsp
- type FixedIp
- type FloatingIp
- type FloatingIpArr
- type FloatingIpList
- type FloatingIpStatus
- type HealthCheck
- type HealthCheckDetail
- type HealthCheckRsp
- type Instances
- func (i *Instances) AddSSHKeyToAllInstances(_ context.Context, _ string, _ []byte) error
- func (i *Instances) CurrentNodeName(_ context.Context, hostname string) (types.NodeName, error)
- func (i *Instances) InstanceExists(ctx context.Context, node *v1.Node) (bool, error)
- func (i *Instances) InstanceExistsByProviderID(_ context.Context, providerID string) (bool, error)
- func (i *Instances) InstanceID(_ context.Context, name types.NodeName) (string, error)
- func (i *Instances) InstanceMetadata(ctx context.Context, node *v1.Node) (*cloudprovider.InstanceMetadata, error)
- func (i *Instances) InstanceShutdown(ctx context.Context, node *v1.Node) (bool, error)
- func (i *Instances) InstanceShutdownByProviderID(_ context.Context, providerID string) (bool, error)
- func (i *Instances) InstanceType(_ context.Context, name types.NodeName) (string, error)
- func (i *Instances) InstanceTypeByProviderID(_ context.Context, providerID string) (string, error)
- func (i *Instances) NodeAddresses(ctx context.Context, name types.NodeName) ([]v1.NodeAddress, error)
- func (i *Instances) NodeAddressesByProviderID(_ context.Context, providerID string) ([]v1.NodeAddress, error)
- type JobResp
- type LbErrorCode
- type Listener
- type ListenerDetail
- type ListenerModify
- type ListenerRsp
- type LoadBalanceVersion
- type LoadBalancerServiceListener
- type MemDetail
- type Member
- type MemberRm
- type MembersDel
- type NATArr
- type NATClient
- func (nat *NATClient) CreateDNATRule(dnatRuleConf *DNATRule) (*DNATRule, error)
- func (nat *NATClient) DeleteDNATRule(dnatRuleId string, natGatewayId string) error
- func (nat *NATClient) GetDNATRule(dnatRuleId string) (*DNATRule, error)
- func (nat *NATClient) GetNATGateway(natGatewayId string) (*NATGateway, error)
- func (nat *NATClient) GetPort(portId string) (*Port, error)
- func (nat *NATClient) ListDNATRules(params map[string]string) (*DNATRuleList, error)
- func (nat *NATClient) ListFloatings(params map[string]string) (*FloatingIpList, error)
- func (nat *NATClient) ListNATGateways(params map[string]string) (*NATGatewayList, error)
- func (nat *NATClient) ListPorts(params map[string]string) (*PortList, error)
- type NATCloud
- func (nat *NATCloud) EnsureLoadBalancer(ctx context.Context, clusterName string, service *v1.Service, hosts []*v1.Node) (*v1.LoadBalancerStatus, error)
- func (nat *NATCloud) EnsureLoadBalancerDeleted(ctx context.Context, clusterName string, service *v1.Service) error
- func (nat *NATCloud) GetLoadBalancer(ctx context.Context, clusterName string, service *v1.Service) (status *v1.LoadBalancerStatus, exists bool, err error)
- func (nat *NATCloud) GetLoadBalancerName(ctx context.Context, clusterName string, service *v1.Service) string
- func (nat *NATCloud) UpdateLoadBalancer(ctx context.Context, clusterName string, service *v1.Service, nodes []*v1.Node) error
- type NATGateway
- type NATGatewayList
- type NATProtocol
- type NATSpec
- type NATStatus
- type Port
- type PortArr
- type PortList
- type PortStatus
- type Quota
- type QuotaResource
- type Server
- type ServiceClient
- type SharedLoadBalancer
- func (l *SharedLoadBalancer) EnsureLoadBalancer(ctx context.Context, clusterName string, service *v1.Service, nodes []*v1.Node) (*v1.LoadBalancerStatus, error)
- func (l *SharedLoadBalancer) EnsureLoadBalancerDeleted(ctx context.Context, clusterName string, service *v1.Service) error
- func (l *SharedLoadBalancer) GetLoadBalancer(ctx context.Context, clusterName string, service *v1.Service) (*v1.LoadBalancerStatus, bool, error)
- func (l *SharedLoadBalancer) GetLoadBalancerName(_ context.Context, clusterName string, service *v1.Service) string
- func (l *SharedLoadBalancer) UpdateLoadBalancer(ctx context.Context, clusterName string, service *v1.Service, nodes []*v1.Node) error
- type ThrottleConfig
- type ThrottleParam
- type ThrottleType
- type Throttler
Constants ¶
const ( ElbEnableCrossVpc = "kubernetes.io/elb.enable-cross-vpc" ElbL4FlavorID = "kubernetes.io/elb.l4-flavor-id" ElbL7FlavorID = "kubernetes.io/elb.l7-flavor-id" ElbAvailabilityZones = "kubernetes.io/elb.availability-zones" ElbEnableTransparentClientIP = "kubernetes.io/elb.enable-transparent-client-ip" )
const ( ELBTypeInternal ELBType = "Internal" ELBTypeExternal ELBType = "External" MemberNormal = "NORMAL" MemberAbnormal = "ABNORMAL" )
const ( QuotaTypeElb = "elb" QuotaTypeListeners = "listeners" )
const ( ELBJobStatusSuccess = "SUCCESS" ELBJobStatusFail = "FAIL" ELBJobStatusRunning = "RUNNING" ELBJobStatusInit = "INIT" )
const ( ELBHealthStatusNormal = "NORMAL" ELBHealthStatusAbnormal = "ABNORMAL" )
const ( HeaderSecurityToken string = "X-Security-Token" HeaderProject string = "X-Project-Id" )
const ( ProviderName = "huaweicloud" LoadBalancerClass = "huaweicloud.com/elb" ElbClass = "kubernetes.io/elb.class" ElbID = "kubernetes.io/elb.id" ElbSubnetID = "kubernetes.io/elb.subnet-id" ElbEipID = "kubernetes.io/elb.eip-id" ELBKeepEip = "kubernetes.io/elb.keep-eip" AutoCreateEipOptions = "kubernetes.io/elb.eip-auto-create-option" ElbAlgorithm = "kubernetes.io/elb.lb-algorithm" ElbSessionAffinityFlag = "kubernetes.io/elb.session-affinity-flag" ElbSessionAffinityOption = "kubernetes.io/elb.session-affinity-option" ElbHealthCheckFlag = "kubernetes.io/elb.health-check-flag" ElbHealthCheckOptions = "kubernetes.io/elb.health-check-option" ElbXForwardedHost = "kubernetes.io/elb.x-forwarded-host" DefaultTLSContainerRef = "kubernetes.io/elb.default-tls-container-ref" ElbIdleTimeout = "kubernetes.io/elb.idle-timeout" ElbRequestTimeout = "kubernetes.io/elb.request-timeout" ElbResponseTimeout = "kubernetes.io/elb.response-timeout" NodeSubnetIDLabelKey = "node.kubernetes.io/subnetid" ELBMarkAnnotation = "kubernetes.io/elb.mark" MaxRetry = 3 HealthzCCE = "cce-healthz" // Attention is a warning message that intended to set to auto-created instance, such as ELB listener. Attention = "It is auto-generated by cloud-provider-huaweicloud, do not modify!" ELBSessionNone = "" ELBSessionSourceIP = "SOURCE_IP" ELBPersistenceTimeout = "persistence_timeout" ELBSessionSourceIPDefaultTimeout = 60 ELBSessionSourceIPMinTimeout = 1 ELBSessionSourceIPMaxTimeout = 60 ProtocolTCP = "TCP" ProtocolUDP = "UDP" ProtocolHTTP = "HTTP" ProtocolHTTPS = "HTTPS" ProtocolTerminatedHTTPS = "TERMINATED_HTTPS" )
Cloud provider name: PaaS Web Services.
const ( ThrottleConfigFile = "THROTTLE_CONFIG_FILE" /* 二代ELB限流环境变量配置 */ MaxInstanceGetQPS = "PUBLIC_ELB_INSTANCE_GET_MAX_QPS" MaxInstanceGetBurst = "PUBLIC_ELB_INSTANCE_GET_MAX_BURST" MaxInstanceListQPS = "PUBLIC_ELB_INSTANCE_LIST_MAX_QPS" MaxInstanceListBurst = "PUBLIC_ELB_INSTANCE_LIST_MAX_BURST" MaxInstanceCreateQPS = "PUBLIC_ELB_INSTANCE_CREATE_MAX_QPS" MaxInstanceCreateBurst = "PUBLIC_ELB_INSTANCE_CREATE_MAX_BURST" MaxInstanceDeleteQPS = "PUBLIC_ELB_INSTANCE_DELETE_MAX_QPS" MaxInstanceDeleteBurst = "PUBLIC_ELB_INSTANCE_DELETE_MAX_BURST" MaxListenerGetQPS = "PUBLIC_ELB_LISTENER_GET_MAX_QPS" MaxListenerGetBurst = "PUBLIC_ELB_LISTENER_GET_MAX_BURST" MaxListenerListQPS = "PUBLIC_ELB_LISTENER_LIST_MAX_QPS" MaxListenerListBurst = "PUBLIC_ELB_LISTENER_LIST_MAX_BURST" MaxListenerCreateQPS = "PUBLIC_ELB_LISTENER_CREATE_MAX_QPS" MaxListenerCreateBurst = "PUBLIC_ELB_LISTENER_CREATE_MAX_BURST" MaxListenerUpdateQPS = "PUBLIC_ELB_LISTENER_UPDATE_MAX_QPS" MaxListenerUpdateBurst = "PUBLIC_ELB_LISTENER_UPDATE_MAX_BURST" MaxListenerDeleteQPS = "PUBLIC_ELB_LISTENER_DELETE_MAX_QPS" MaxListenerDeleteBurst = "PUBLIC_ELB_LISTENER_DELETE_MAX_BURST" MaxPoolGetQPS = "PUBLIC_ELB_POOL_GET_MAX_QPS" MaxPoolGetBurst = "PUBLIC_ELB_POOL_GET_MAX_BURST" MaxPoolListQPS = "PUBLIC_ELB_POOL_LIST_MAX_QPS" MaxPoolListBurst = "PUBLIC_ELB_POOL_LIST_MAX_BURST" MaxPoolCreateQPS = "PUBLIC_ELB_POOL_CREATE_MAX_QPS" MaxPoolCreateBurst = "PUBLIC_ELB_POOL_CREATE_MAX_BURST" MaxPoolUpdateQPS = "PUBLIC_ELB_POOL_UPDATE_MAX_QPS" MaxPoolUpdateBurst = "PUBLIC_ELB_POOL_UPDATE_MAX_BURST" MaxPoolDeleteQPS = "PUBLIC_ELB_POOL_DELETE_MAX_QPS" MaxPoolDeleteBurst = "PUBLIC_ELB_POOL_DELETE_MAX_BURST" MaxMemberGetQPS = "PUBLIC_ELB_MEMBER_GET_MAX_QPS" MaxMemberGetBurst = "PUBLIC_ELB_MEMBER_GET_MAX_BURST" MaxMemberListQPS = "PUBLIC_ELB_MEMBER_LIST_MAX_QPS" MaxMemberListBurst = "PUBLIC_ELB_MEMBER_LIST_MAX_BURST" MaxMemberCreateQPS = "PUBLIC_ELB_MEMBER_CREATE_MAX_QPS" MaxMemberCreateBurst = "PUBLIC_ELB_MEMBER_CREATE_MAX_BURST" MaxMemberUpdateQPS = "PUBLIC_ELB_MEMBER_UPDATE_MAX_QPS" MaxMemberUpdateBurst = "PUBLIC_ELB_MEMBER_UPDATE_MAX_BURST" MaxMemberDeleteQPS = "PUBLIC_ELB_MEMBER_DELETE_MAX_QPS" MaxMemberDeleteBurst = "PUBLIC_ELB_MEMBER_DELETE_MAX_BURST" MaxHealthzGetQPS = "PUBLIC_ELB_HEALTHZ_GET_MAX_QPS" MaxHealthzGetBurst = "PUBLIC_ELB_HEALTHZ_GET_MAX_BURST" MaxHealthzListQPS = "PUBLIC_ELB_HEALTHZ_LIST_MAX_QPS" MaxHealthzListBurst = "PUBLIC_ELB_HEALTHZ_LIST_MAX_BURST" MaxHealthzCreateQPS = "PUBLIC_ELB_HEALTHZ_CREATE_MAX_QPS" MaxHealthzCreateBurst = "PUBLIC_ELB_HEALTHZ_CREATE_MAX_BURST" MaxHealthzUpdateQPS = "PUBLIC_ELB_HEALTHZ_UPDATE_MAX_QPS" MaxHealthzUpdateBurst = "PUBLIC_ELB_HEALTHZ_UPDATE_MAX_BURST" MaxHealthzDeleteQPS = "PUBLIC_ELB_HEALTHZ_DELETE_MAX_QPS" MaxHealthzDeleteBurst = "PUBLIC_ELB_HEALTHZ_DELETE_MAX_BURST" /* NAT网关限流环境变量配置 */ MaxNatGatewayGetQPS = "NAT_GATEWAY_GET_MAX_QPS" MaxNatGatewayGetBurst = "NAT_GATEWAY_GET_MAX_BURST" MaxNatGatewayListQPS = "NAT_GATEWAY_LIST_MAX_QPS" MaxNatGatewayListBurst = "NAT_GATEWAY_LIST_MAX_BURST" MaxNatRuleGetQPS = "NAT_RULE_GET_MAX_QPS" MaxNatRuleGetBurst = "NAT_RULE_GET_MAX_BURST" MaxNatRuleListQPS = "NAT_RULE_LIST_MAX_QPS" MaxNatRuleListBurst = "NAT_RULE_LIST_MAX_BURST" MaxNatRuleCreateQPS = "NAT_RULE_CREATE_MAX_QPS" MaxNatRuleCreateBurst = "NAT_RULE_CREATE_MAX_BURST" MaxNatRuleDeleteQPS = "NAT_RULE_DELETE_MAX_QPS" MaxNatRuleDeleteBurst = "NAT_RULE_DELETE_MAX_BURST" MaxEipBindQPS = "EIP_BIND_MAX_QPS" MaxEipBindBurst = "EIP_BIND_MAX_BURST" MaxEipCreateQPS = "EIP_CREATE_MAX_QPS" MaxEipCreateBurst = "EIP_CREATE_MAX_BURST" MaxEipDeleteQPS = "EIP_DELETE_MAX_QPS" MaxEipDeleteBurst = "EIP_DELETE_MAX_BURST" MaxEipListQPS = "EIP_LIST_MAX_QPS" MaxEipListBurst = "EIP_LIST_MAX_BURST" MaxSubnetGetQPS = "SUBNET_GET_MAX_QPS" MaxSubnetGetBurst = "SUBNET_GET_MAX_BURST" MaxSubnetListQPS = "SUBNET_LIST_MAX_QPS" MaxSubnetListBurst = "SUBNET_LIST_MAX_BURST" )
const (
AnnotationsNATID string = "kubernetes.io/natgateway.id"
)
const (
ClusterID string = "CLUSTER_ID"
)
const ELBDescFmt string = "[a-zA-Z0-9\\_\\-]{0,128}"
description: 0-128
const ELBNameFmt string = "[a-zA-Z\\_][a-zA-Z0-9\\_\\-]{0,63}"
Regular expressions name: 1-64
Variables ¶
This section is empty.
Functions ¶
func CheckNodeHealth ¶
if the node not health, it will not be added to ELB
func DecodeBody ¶
decodeBody is used to JSON decode a body
func DoRequest ¶
func DoRequest(service *ServiceClient, throttle flowcontrol.RateLimiter, r *request) (*http.Response, error)
doRequest runs a request with our client
func GetHealthCheckPort ¶
func GetHealthCheckPort(service *v1.Service) *v1.ServicePort
func GetListenerName ¶
func GetOldListenerName ¶
to suit for old version if the elb has been created with the old version its listener name is service.name+service.uid
func GetSessionAffinityType ¶
func IsPodActive ¶
func IsValidDesc ¶
func IsValidName ¶
func NewRequest ¶
NewRequest is used to create a new request if accessIn == nil mean not to sign header
Types ¶
type AccessInfo ¶
type AllowAddressPair ¶
type AsyncJobResp ¶
type AsyncJobResp struct { Status string `json:"status"` Entities struct { Elb struct { LoadbalancerId string `json:"id"` } `json:"elb"` Members []struct { Address string `json:"address"` ID string `json:"id"` } `json:"members"` } `json:"entities"` FailReason string `json:"fail_reason"` ErrorCode string `json:"error_code"` }
Asynchronous job query response
type CloudProvider ¶ added in v0.19.15
type CloudProvider struct { Basic // contains filtered or unexported fields }
func NewHWSCloud ¶
func NewHWSCloud(cfg io.Reader) (*CloudProvider, error)
func (*CloudProvider) Clusters ¶ added in v0.19.15
func (h *CloudProvider) Clusters() (cloudprovider.Clusters, bool)
Clusters returns an implementation of Clusters for Huawei Web Services.
func (*CloudProvider) EnsureLoadBalancer ¶ added in v0.19.15
func (*CloudProvider) EnsureLoadBalancerDeleted ¶ added in v0.19.15
func (*CloudProvider) ExternalID ¶ added in v0.19.15
ExternalID returns the cloud provider ID of the specified instance (deprecated).
func (*CloudProvider) GetLoadBalancer ¶ added in v0.19.15
func (h *CloudProvider) GetLoadBalancer(ctx context.Context, clusterName string, service *v1.Service) (status *v1.LoadBalancerStatus, exists bool, err error)
func (*CloudProvider) GetLoadBalancerName ¶ added in v0.19.15
func (*CloudProvider) HasClusterID ¶ added in v0.19.15
func (h *CloudProvider) HasClusterID() bool
HasClusterID returns true if the cluster has a clusterID
func (*CloudProvider) Initialize ¶ added in v0.19.15
func (h *CloudProvider) Initialize(clientBuilder cloudprovider.ControllerClientBuilder, stop <-chan struct{})
Initialize provides the cloud with a kubernetes client builder and may spawn goroutines to perform housekeeping activities within the cloud provider.
func (*CloudProvider) Instances ¶ added in v0.19.15
func (h *CloudProvider) Instances() (cloudprovider.Instances, bool)
Instances returns an instances interface. Also returns true if the interface is supported, false otherwise.
func (*CloudProvider) InstancesV2 ¶ added in v0.19.15
func (h *CloudProvider) InstancesV2() (cloudprovider.InstancesV2, bool)
InstancesV2 is an implementation for instances and should only be implemented by external cloud providers. Don't support this feature for now.
func (*CloudProvider) ListClusters ¶ added in v0.19.15
func (h *CloudProvider) ListClusters(ctx context.Context) ([]string, error)
ListClusters is an implementation of Clusters.ListClusters
func (*CloudProvider) LoadBalancer ¶ added in v0.19.15
func (h *CloudProvider) LoadBalancer() (cloudprovider.LoadBalancer, bool)
TCPLoadBalancer returns an implementation of TCPLoadBalancer for Huawei Web Services.
func (*CloudProvider) ProviderName ¶ added in v0.19.15
func (h *CloudProvider) ProviderName() string
ProviderName returns the cloud provider ID.
func (*CloudProvider) Routes ¶ added in v0.19.15
func (h *CloudProvider) Routes() (cloudprovider.Routes, bool)
Routes returns an implementation of Routes for Huawei Web Services.
func (*CloudProvider) UpdateLoadBalancer ¶ added in v0.19.15
func (*CloudProvider) Zones ¶ added in v0.19.15
func (h *CloudProvider) Zones() (cloudprovider.Zones, bool)
Zones returns an implementation of Zones for Huawei Web Services.
type CreateEIPOptions ¶ added in v0.19.15
type DNATRule ¶
type DNATRule struct { Id string `json:"id,omitempty"` TenantId string `json:"tenant_id,omitempty"` NATGatewayId string `json:"nat_gateway_id,omitempty"` PortId string `json:"port_id,omitempty"` InternalServicePort int32 `json:"internal_service_port,omitempty"` FloatingIpId string `json:"floating_ip_id,omitempty"` ExternalServicePort int32 `json:"external_service_port,omitempty"` FloatingIpAddress string `json:"floating_ip_address,omitempty"` Protocol NATProtocol `json:"protocol,omitempty"` Status DNATRuleStatus `json:"status,omitempty"` AdminStateUp bool `json:"admin_state_up,omitempty"` Description string `json:"description,omitempty"` }
DNA Rule
type DNATRuleArr ¶
type DNATRuleArr struct {
DNATRule DNATRule `json:"dnat_rule"`
}
type DNATRuleDescription ¶
type DNATRuleStatus ¶
type DNATRuleStatus string
const ( DNATRuleStatusActive DNATRuleStatus = "ACTIVE" DNATRuleStatusError DNATRuleStatus = "ERROR" DNATRuleStatusPendingCreate DNATRuleStatus = "PENDING_CREATE" DNATRuleStatusPendingUpdate DNATRuleStatus = "PENDING_UPDATE" DNATRuleStatusPendingDelete DNATRuleStatus = "PENDING_DELETE" )
type DedicatedLoadBalancer ¶ added in v0.20.2
type DedicatedLoadBalancer struct {
Basic
}
func (*DedicatedLoadBalancer) EnsureLoadBalancer ¶ added in v0.20.2
func (*DedicatedLoadBalancer) EnsureLoadBalancerDeleted ¶ added in v0.20.2
func (*DedicatedLoadBalancer) GetLoadBalancer ¶ added in v0.20.2
func (d *DedicatedLoadBalancer) GetLoadBalancer(ctx context.Context, clusterName string, service *v1.Service) ( *v1.LoadBalancerStatus, bool, error)
func (*DedicatedLoadBalancer) GetLoadBalancerName ¶ added in v0.20.2
type DeleteFunc ¶
type DeleteFuncWithObj ¶
type ELBAlgorithm ¶
type ELBAlgorithm string
type ELBClient ¶
type ELBClient struct {
// contains filtered or unexported fields
}
func NewELBClient ¶
func (*ELBClient) AsyncCreateMembers ¶
func (*ELBClient) AsyncDeleteMembers ¶
func (e *ELBClient) AsyncDeleteMembers(listenerID string, memDel *MembersDel) (*JobResp, error)
AsyncDeleteMembers deletes members as type *MembersDel.
func (*ELBClient) CreateHealthCheck ¶
func (e *ELBClient) CreateHealthCheck(healthConf *HealthCheck) (*HealthCheckRsp, error)
func (*ELBClient) CreateListener ¶
func (e *ELBClient) CreateListener(listenerConf *Listener) (*ListenerRsp, *ErrorRsp, error)
func (*ELBClient) CreateLoadBalancer ¶
Create an ELB instance 因为这个是通过portal创建的,所以无需API创建
func (*ELBClient) DeleteHealthCheck ¶
DeleteHealthCheck deletes a health check.
func (*ELBClient) DeleteListener ¶
func (*ELBClient) DeleteLoadBalancer ¶
DeleteLoadBalancer deletes loadbalancer by ID.
func (*ELBClient) DeleteMembers ¶
members as type *MembersDel
func (*ELBClient) DeregisterInstancesFromListener ¶
func (e *ELBClient) DeregisterInstancesFromListener(listenerID string, memDel *MembersDel) error
members as type *MembersDel
func (*ELBClient) GetHealthCheck ¶
func (e *ELBClient) GetHealthCheck(healthcheckID string) (*HealthCheckDetail, *ErrorRsp, error)
GetHealthCheck gets health check details info.
func (*ELBClient) GetJobStatus ¶
func (e *ELBClient) GetJobStatus(jobID string) (*AsyncJobResp, error)
func (*ELBClient) GetListener ¶
func (e *ELBClient) GetListener(listenerID string) (*ListenerDetail, error)
func (*ELBClient) GetLoadBalancer ¶
GetLoadBalancer gets an ELB instance by ID.
func (*ELBClient) ListListeners ¶
func (e *ELBClient) ListListeners(loadbalancerID string) ([]*ListenerDetail, error)
func (*ELBClient) ListLoadBalancers ¶
ListLoadBalancers list ELBs.
func (*ELBClient) ListMachines ¶
func (e *ELBClient) ListMachines() (*EcsServers, error)
GetEcsByIp get hws ecs server by IP address
func (*ELBClient) ListMembers ¶
func (*ELBClient) RegisterInstancesWithListener ¶
func (e *ELBClient) RegisterInstancesWithListener(listenerID string, memberConf []*Member) (*AsyncJobResp, error)
func (*ELBClient) UpdateHealthCheck ¶
func (e *ELBClient) UpdateHealthCheck(healthConf *HealthCheck, healthcheckID string) (*HealthCheckRsp, error)
func (*ELBClient) UpdateListener ¶
func (e *ELBClient) UpdateListener(listener *Listener, listenerID string) (*ListenerDetail, error)
func (*ELBClient) WaitJobComplete ¶
type ELBCloud ¶
type ELBCloud struct {
Basic
}
func (*ELBCloud) EnsureLoadBalancer ¶
func (elb *ELBCloud) EnsureLoadBalancer(ctx context.Context, clusterName string, service *v1.Service, hosts []*v1.Node) (*v1.LoadBalancerStatus, error)
EnsureTCPLoadBalancer is an implementation of TCPLoadBalancer.EnsureTCPLoadBalancer. EnsureLoadBalancer creates a new load balancer 'name', or updates the existing one. Returns the status of the balancer Implementations must treat the *v1.Service and *v1.Node parameters as read-only and not modify them.
func (*ELBCloud) EnsureLoadBalancerDeleted ¶
func (elb *ELBCloud) EnsureLoadBalancerDeleted(ctx context.Context, clusterName string, service *v1.Service) error
EnsureTCPLoadBalancerDeleted is an implementation of TCPLoadBalancer.EnsureTCPLoadBalancerDeleted.
func (*ELBCloud) GetLoadBalancer ¶
func (elb *ELBCloud) GetLoadBalancer(ctx context.Context, clusterName string, service *v1.Service) (status *v1.LoadBalancerStatus, exists bool, err error)
GetLoadBalancer gets loadbalancer for service.
func (*ELBCloud) GetLoadBalancerName ¶
func (elb *ELBCloud) GetLoadBalancerName(ctx context.Context, clusterName string, service *v1.Service) string
Not implemented
func (*ELBCloud) UpdateLoadBalancer ¶
func (elb *ELBCloud) UpdateLoadBalancer(ctx context.Context, clusterName string, service *v1.Service, hosts []*v1.Node) error
UpdateTCPLoadBalancer is an implementation of TCPLoadBalancer.UpdateTCPLoadBalancer. if update return failed, the caller must backup the failed service and try to update again.
type ELBProtocol ¶
type ELBProtocol string
type ELBStickySessionType ¶
type ELBStickySessionType string
sticky_session_type
const ( ELBStickySessionTypeInsert ELBStickySessionType = "insert" ELBStickySessionTypeServer ELBStickySessionType = "server" )
type EcsServers ¶
type EcsServers struct {
Servers []Server `json:"servers,omitempty"`
}
Ecs servicers deatil
type ElbNum ¶
type ElbNum struct {
InstanceNum string `json:"instance_num"`
}
TODO: unmarshal failed, if return instance_num=0 body: {"loadbalancers":{},"instance_num":"0"}
type ErrorRsp ¶
type ErrorRsp struct { Error struct { Message string `json:"message"` Code LbErrorCode `json:"code"` } `json:"error"` }
type FloatingIp ¶
type FloatingIp struct { Id string `json:"id,omitempty"` Status FloatingIpStatus `json:"status,omitempty"` FloatingIpAddress string `json:"floating_ip_address,omitempty"` FloatingNetworkId string `json:"floating_network_id,omitempty"` RouterId string `json:"router_id,omitempty"` PortId string `json:"port_id,omitempty"` FixedIpAddress string `json:"fixed_ip_address,omitempty"` TenantId string `json:"tenant_id,omitempty"` }
type FloatingIpArr ¶
type FloatingIpArr struct {
FloatingIp FloatingIp `json:"floatingip"`
}
type FloatingIpList ¶
type FloatingIpList struct {
FloatingIps []FloatingIp `json:"floatingips,omitempty"`
}
type FloatingIpStatus ¶
type FloatingIpStatus string
const ( FloatingIpStatusActive FloatingIpStatus = "ACTIVE" FloatingIpStatusError FloatingIpStatus = "ERROR" FloatingIpStatusDown FloatingIpStatus = "DOWN" )
type HealthCheck ¶
type HealthCheck struct { // create Listener parameters ListenerID string `json:"listener_id,omitempty"` HealthcheckProtocol ELBProtocol `json:"healthcheck_protocol"` HealthcheckURI string `json:"healthcheck_uri,omitempty"` HealthcheckConnectPort int `json:"healthcheck_connect_port"` HealthyThreshold int `json:"healthy_threshold"` UnhealthyThreshold int `json:"unhealthy_threshold"` HealthcheckTimeout int `json:"healthcheck_timeout"` HealthcheckInterval int `json:"healthcheck_interval"` }
HealthCheck
type HealthCheckDetail ¶
type HealthCheckDetail struct { HealthCheckRsp HealthcheckStatus string `json:"healthcheck_status,omitempty"` CreateTime string `json:"create_time"` }
type HealthCheckRsp ¶
type HealthCheckRsp struct { HealthCheck ID string `json:"id,omitempty"` TenantID string `json:"tenant_id,omitempty"` }
type Instances ¶
type Instances struct {
Basic
}
func (*Instances) AddSSHKeyToAllInstances ¶
AddSSHKeyToAllInstances adds an SSH public key as a legal identity for all instances expected format for the key is standard ssh-keygen format: <protocol> <blob>
func (*Instances) CurrentNodeName ¶
CurrentNodeName returns the name of the node we are currently running on On most clouds (e.g. GCE) this is the hostname, so we provide the hostname
func (*Instances) InstanceExists ¶ added in v0.19.15
InstanceExists returns true if the instance for the given node exists according to the cloud provider.
func (*Instances) InstanceExistsByProviderID ¶
InstanceExistsByProviderID returns true if the instance for the given provider exists.
func (*Instances) InstanceID ¶
InstanceID returns the cloud provider ID of the node with the specified NodeName.
func (*Instances) InstanceMetadata ¶ added in v0.19.15
func (i *Instances) InstanceMetadata(ctx context.Context, node *v1.Node) (*cloudprovider.InstanceMetadata, error)
InstanceMetadata returns the instance's metadata. The values returned in InstanceMetadata are translated into specific fields in the Node object on registration.
func (*Instances) InstanceShutdown ¶ added in v0.19.15
InstanceShutdown returns true if the instance is shutdown according to the cloud provider.
func (*Instances) InstanceShutdownByProviderID ¶
func (i *Instances) InstanceShutdownByProviderID(_ context.Context, providerID string) (bool, error)
InstanceShutdownByProviderID returns true if the instance is shutdown in cloudprovider
func (*Instances) InstanceType ¶
InstanceType returns the type of the specified instance.
func (*Instances) InstanceTypeByProviderID ¶
InstanceTypeByProviderID returns the type of the specified instance.
func (*Instances) NodeAddresses ¶
func (i *Instances) NodeAddresses(ctx context.Context, name types.NodeName) ([]v1.NodeAddress, error)
NodeAddresses returns the addresses of the specified instance.
func (*Instances) NodeAddressesByProviderID ¶
func (i *Instances) NodeAddressesByProviderID(_ context.Context, providerID string) ([]v1.NodeAddress, error)
NodeAddressesByProviderID returns the addresses of the specified instance.
type LbErrorCode ¶
type LbErrorCode string
const ( ElbError6091 LbErrorCode = "ELB.6091" //create listener failed: ELB already has 5 listeners ElbError2012 LbErrorCode = "ELB.2012" //backend server does not exist ElbError1101 LbErrorCode = "ELB.1101" //invalid parameter: vip_address already exists ElbError6101 LbErrorCode = "ELB.6101" //create listener failed: duplicated port ElbError7020 LbErrorCode = "ELB.7020" //healthcheck is not exist )
type Listener ¶
type Listener struct { // create Listener parameters ListenerModify LoadbalancerID string `json:"loadbalancer_id,omitempty"` Protocol ELBProtocol `json:"protocol,omitempty"` Port int `json:"port,omitempty"` BackendProtocol ELBProtocol `json:"backend_protocol,omitempty"` BackendPort int `json:"backend_port,omitempty"` LBAlgorithm ELBAlgorithm `json:"lb_algorithm,omitempty"` SSLCertificate string `json:"ssl_certificate,omitempty"` SessionSticky bool `json:"session_sticky"` StickySessionType ELBStickySessionType `json:"sticky_session_type,omitempty"` CookieTimeout time.Duration `json:"cookie_timeout,omitempty"` TCPTimeout int `json:"tcp_timeout,omitempty"` }
Listener
type ListenerDetail ¶
type ListenerDetail struct { ListenerModify LoadbalancerID string `json:"loadbalancer_id"` Protocol ELBProtocol `json:"protocol"` Port int `json:"port"` BackendProtocol ELBProtocol `json:"backend_protocol"` BackendPort int `json:"backend_port"` LBAlgorithm ELBAlgorithm `json:"lb_algorithm"` SSLCertificate string `json:"ssl_certificate,omitempty"` SessionSticky bool `json:"session_sticky,omitempty"` StickySessionType ELBStickySessionType `json:"sticky_session_type,omitempty"` CookieTimeout time.Duration `json:"cookie_timeout,omitempty"` ID string `json:"id"` TenantID string `json:"tenant_id"` Status string `json:"status"` CreateTime string `json:"create_time"` HealthcheckID string `json:"healthcheck_id"` TCPTimeout int `json:"tcp_timeout,omitempty"` }
type ListenerModify ¶
type ListenerRsp ¶
type LoadBalanceVersion ¶
type LoadBalanceVersion int
const ( VersionNotNeedLB LoadBalanceVersion = iota // if the service type is not LoadBalancer VersionELB // classic load balancer VersionDedicated // enhanced load balancer(performance guarantee) VersionNAT // network address translation )
type LoadBalancerServiceListener ¶ added in v0.20.4
type LoadBalancerServiceListener struct { Basic // contains filtered or unexported fields }
type Member ¶
type Member struct { // create Member parameters ListenerID string `json:"listener_id,omitempty"` ServerID string `json:"server_id"` Address string `json:"address"` }
Backend host Member
type MembersDel ¶
type MembersDel struct {
RemoveMember []MemberRm `json:"removeMember"`
}
type NATArr ¶
type NATArr struct {
NATGateway NATGateway `json:"nat_gateway"`
}
type NATClient ¶
type NATClient struct {
// contains filtered or unexported fields
}
NAT client has two parts: ecsClient connect EcsEndpoint natClient connect natClient
func NewNATClient ¶
func (*NATClient) CreateDNATRule ¶
func (*NATClient) DeleteDNATRule ¶
func (*NATClient) GetDNATRule ¶
func (*NATClient) GetNATGateway ¶
func (nat *NATClient) GetNATGateway(natGatewayId string) (*NATGateway, error)
* >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> * NAT implement of functions regrding NAT gateway * >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
func (*NATClient) ListDNATRules ¶
func (nat *NATClient) ListDNATRules(params map[string]string) (*DNATRuleList, error)
func (*NATClient) ListFloatings ¶
func (nat *NATClient) ListFloatings(params map[string]string) (*FloatingIpList, error)
func (*NATClient) ListNATGateways ¶
func (nat *NATClient) ListNATGateways(params map[string]string) (*NATGatewayList, error)
type NATCloud ¶
type NATCloud struct {
Basic
}
func (*NATCloud) EnsureLoadBalancer ¶
func (nat *NATCloud) EnsureLoadBalancer(ctx context.Context, clusterName string, service *v1.Service, hosts []*v1.Node) (*v1.LoadBalancerStatus, error)
* clusterName: discarded * service: each service has its corresponding DNAT rule * nodes: all nodes under ServiceController, i.e. all nodes under the k8s cluster
func (*NATCloud) EnsureLoadBalancerDeleted ¶
func (nat *NATCloud) EnsureLoadBalancerDeleted(ctx context.Context, clusterName string, service *v1.Service) error
delete all DNATRules under a service
(1) find the DNAT rules of the service (2) delete the DNAT rule
func (*NATCloud) GetLoadBalancer ¶
func (*NATCloud) GetLoadBalancerName ¶
func (nat *NATCloud) GetLoadBalancerName(ctx context.Context, clusterName string, service *v1.Service) string
* Not implemented
func (*NATCloud) UpdateLoadBalancer ¶
func (nat *NATCloud) UpdateLoadBalancer(ctx context.Context, clusterName string, service *v1.Service, nodes []*v1.Node) error
update members in the service
(1) find the previous DNATRule (2) check whether the node whose port set in the rule is health (3) if not health delete the previous and create a new one
type NATGateway ¶
type NATGateway struct { Id string `json:"id,omitempty"` Name string `json:"name,omitempty"` Description string `json:"description,omitempty"` RouterId string `json:"router_id,omitempty"` InternalNetWorkId string `json:"internal_network_id,omitempty"` Status NATStatus `json:"status,omitempty"` Spec NATSpec `json:"spec,omitempty"` TenantId string `json:"tenant_id,omitempty"` AdminStateUp bool `json:"admin_state_up,omitempty"` }
NAT Gateway
type NATGatewayList ¶
type NATGatewayList struct {
NATGateways []NATGateway `json:"nat_gateways"`
}
list type
type NATProtocol ¶
type NATProtocol string
const ( NATProtocolTCP NATProtocol = "TCP" NATProtocolUDP NATProtocol = "UDP" )
type Port ¶
type Port struct { Id string `json:"id,omitempty"` Name string `json:"name,omitempty"` NetworkId string `json:"network_id,omitempty"` AdminStateUp bool `json:"admin_state_up,omitempty"` MacAddress string `json:"mac_address,omitempty"` FixedIps []*FixedIp `json:"fixed_ips,omitempty"` DeviceId string `json:"device_id,omitempty"` DeviceOwner string `json:"device_owner,omitempty"` TenantId string `json:"tenant_id,omitempty"` Status PortStatus `json:"status,omitempty"` SecurityGroups []string `json:"security_groups,omitempty"` AllowedAddressPairs []*AllowAddressPair `json:"allow_address_pairs,omitempty"` }
type PortStatus ¶
type PortStatus string
const ( PortStatusActive PortStatus = "ACTIVE" PortStatusBuild PortStatus = "BUILD" PortStatusDown PortStatus = "DOWN" )
type Quota ¶
type Quota struct { Quotas struct { Resources []QuotaResource `json:"resources"` } `json:"quotas"` }
Quota
type QuotaResource ¶
type Server ¶
type Server struct { Id string `json:"id"` Name string `json:"name"` Addresses map[string][]EcsAddress `json:"addresses,omitempty"` }
EcsServer ecs server info
type ServiceClient ¶
type ServiceClient struct { Client *http.Client Endpoint string Access *AccessInfo TenantId string // nolint:golint // struct field `TenantId` should be `TenantID` }
type SharedLoadBalancer ¶ added in v0.19.15
type SharedLoadBalancer struct {
}func (*SharedLoadBalancer) EnsureLoadBalancer ¶ added in v0.19.15
func (l *SharedLoadBalancer) EnsureLoadBalancer(ctx context.Context, clusterName string, service *v1.Service, nodes []*v1.Node) (*v1.LoadBalancerStatus, error)
EnsureLoadBalancer creates a new load balancer 'name', or updates the existing one. Returns the status of the balancer
func (*SharedLoadBalancer) EnsureLoadBalancerDeleted ¶ added in v0.19.15
func (l *SharedLoadBalancer) EnsureLoadBalancerDeleted(ctx context.Context, clusterName string, service *v1.Service) error
EnsureLoadBalancerDeleted deletes the specified load balancer
func (*SharedLoadBalancer) GetLoadBalancer ¶ added in v0.19.15
func (l *SharedLoadBalancer) GetLoadBalancer(ctx context.Context, clusterName string, service *v1.Service) (*v1.LoadBalancerStatus, bool, error)
func (*SharedLoadBalancer) GetLoadBalancerName ¶ added in v0.19.15
func (l *SharedLoadBalancer) GetLoadBalancerName(_ context.Context, clusterName string, service *v1.Service) string
GetLoadBalancerName returns the name of the load balancer. Implementations must treat the *v1.Service parameter as read-only and not modify it.
type ThrottleConfig ¶
type ThrottleConfig struct {
Throttles map[string]ThrottleParam `json:"throttles"`
}
type ThrottleParam ¶
type ThrottleType ¶
type ThrottleType string
const ( /* 二代ELB限流器配置 */ ELB_INSTANCE_GET ThrottleType = "ELB_INSTANCE_GET" ELB_INSTANCE_LIST ThrottleType = "ELB_INSTANCE_LIST" ELB_INSTANCE_CREATE ThrottleType = "ELB_INSTANCE_CREATE" ELB_INSTANCE_DELETE ThrottleType = "ELB_INSTANCE_DELETE" ELB_LISTENER_GET ThrottleType = "ELB_LISTENER_GET" ELB_LISTENER_LIST ThrottleType = "ELB_LISTENER_LIST" ELB_LISTENER_CREATE ThrottleType = "ELB_LISTENER_CREATE" ELB_LISTENER_UPDATE ThrottleType = "ELB_LISTENER_UPDATE" ELB_LISTENER_DELETE ThrottleType = "ELB_LISTENER_DELETE" ELB_POOL_GET ThrottleType = "ELB_POOL_GET" ELB_POOL_LIST ThrottleType = "ELB_POOL_LIST" ELB_POOL_CREATE ThrottleType = "ELB_POOL_CREATE" ELB_POOL_UPDATE ThrottleType = "ELB_POOL_UPDATE" ELB_POOL_DELETE ThrottleType = "ELB_POOL_DELETE" ELB_MEMBER_GET ThrottleType = "ELB_MEMBER_GET" ELB_MEMBER_LIST ThrottleType = "ELB_MEMBER_LIST" ELB_MEMBER_CREATE ThrottleType = "ELB_MEMBER_CREATE" ELB_MEMBER_UPDATE ThrottleType = "ELB_MEMBER_UPDATE" ELB_MEMBER_DELETE ThrottleType = "ELB_MEMBER_DELETE" ELB_WHITELIST_GET ThrottleType = "ELB_WHITELIST_GET" ELB_WHITELIST_LIST ThrottleType = "ELB_WHITELIST_LIST" ELB_WHITELIST_CREATE ThrottleType = "ELB_WHITELIST_CREATE" ELB_WHITELIST_UPDATE ThrottleType = "ELB_WHITELIST_UPDATE" ELB_WHITELIST_DELETE ThrottleType = "ELB_WHITELIST_DELETE" ELB_HEALTHZ_GET ThrottleType = "ELB_HEALTHZ_GET" ELB_HEALTHZ_LIST ThrottleType = "ELB_HEALTHZ_LIST" ELB_HEALTHZ_CREATE ThrottleType = "ELB_HEALTHZ_CREATE" ELB_HEALTHZ_UPDATE ThrottleType = "ELB_HEALTHZ_UPDATE" ELB_HEALTHZ_DELETE ThrottleType = "ELB_HEALTHZ_DELETE" /* NAT网关限流器配置 */ NAT_GATEWAY_GET ThrottleType = "NAT_GATEWAY_GET" NAT_GATEWAY_LIST ThrottleType = "NAT_GATEWAY_LIST" NAT_RULE_GET ThrottleType = "NAT_RULE_GET" NAT_RULE_LIST ThrottleType = "NAT_RULE_LIST" NAT_RULE_CREATE ThrottleType = "NAT_RULE_CREATE" NAT_RULE_DELETE ThrottleType = "NAT_RULE_DELETE" EIP_BIND ThrottleType = "EIP_BIND" EIP_CREATE ThrottleType = "EIP_CREATE" EIP_DELETE ThrottleType = "EIP_DELETE" EIP_LIST ThrottleType = "EIP_LIST" SUBNET_GET ThrottleType = "SUBNET_GET" SUBNET_LIST ThrottleType = "SUBNET_LIST" /* ECS限流器配置 */ ECS_LIST ThrottleType = "ECS_LIST" )
type Throttler ¶
type Throttler struct {
// contains filtered or unexported fields
}
func InitialThrottler ¶
func (*Throttler) GetThrottleByKey ¶
func (t *Throttler) GetThrottleByKey(key ThrottleType) flowcontrol.RateLimiter