Documentation
¶
Index ¶
- Constants
- Variables
- func LogFields(l logr.Logger, obj any) logr.Logger
- type AssignIPv6AddressesOption
- type AssignIPv6AddressesOptions
- type AssignPrivateIPAddressOption
- type AssignPrivateIPAddressOptions
- func (c *AssignPrivateIPAddressOptions) ApplyAssignPrivateIPAddress(options *AssignPrivateIPAddressOptions)
- func (c *AssignPrivateIPAddressOptions) EFLO(idempotentKeyGen IdempotentKeyGen) (*eflo.AssignLeniPrivateIpAddressRequest, func(), error)
- func (c *AssignPrivateIPAddressOptions) Finish(idempotentKeyGen IdempotentKeyGen) (*ecs.AssignPrivateIpAddressesRequest, func(), error)
- type AttachNetworkInterfaceOption
- type AttachNetworkInterfaceOptions
- type CreateNetworkInterfaceOption
- type CreateNetworkInterfaceOptions
- func (c *CreateNetworkInterfaceOptions) ApplyCreateNetworkInterface(options *CreateNetworkInterfaceOptions)
- func (c *CreateNetworkInterfaceOptions) EFLO(idempotentKeyGen IdempotentKeyGen) (*eflo.CreateElasticNetworkInterfaceRequest, func(), error)
- func (c *CreateNetworkInterfaceOptions) Finish(idempotentKeyGen IdempotentKeyGen) (*ecs.CreateNetworkInterfaceRequest, func(), error)
- type DescribeNetworkInterfaceOption
- type DescribeNetworkInterfaceOptions
- type ECSLimitProvider
- type EFLO
- type EfloLimitProvider
- type IPSet
- type IdempotentKeyGen
- type Limit
- type LimitConfig
- type LimitProvider
- type Limits
- type NetworkCard
- type NetworkInterface
- type NetworkInterfaceOptions
- type OpenAPI
- func (a *OpenAPI) AssignIpv6Addresses(ctx context.Context, opts ...AssignIPv6AddressesOption) ([]netip.Addr, error)
- func (a *OpenAPI) AssignIpv6Addresses2(ctx context.Context, opts ...AssignIPv6AddressesOption) ([]IPSet, error)
- func (a *OpenAPI) AssignIpv6AddressesV2(ctx context.Context, opts ...AssignIPv6AddressesOption) ([]IPSet, error)
- func (a *OpenAPI) AssignLeniPrivateIPAddress(ctx context.Context, eniID, prefer string) (string, error)
- func (a *OpenAPI) AssignLeniPrivateIPAddress2(ctx context.Context, opts ...AssignPrivateIPAddressOption) ([]IPSet, error)
- func (a *OpenAPI) AssignPrivateIPAddress(ctx context.Context, opts ...AssignPrivateIPAddressOption) ([]netip.Addr, error)
- func (a *OpenAPI) AssignPrivateIPAddress2(ctx context.Context, opts ...AssignPrivateIPAddressOption) ([]IPSet, error)
- func (a *OpenAPI) AssignPrivateIPAddressV2(ctx context.Context, opts ...AssignPrivateIPAddressOption) ([]IPSet, error)
- func (a *OpenAPI) AttachNetworkInterface(ctx context.Context, opts ...AttachNetworkInterfaceOption) error
- func (a *OpenAPI) AttachNetworkInterfaceV2(ctx context.Context, opts ...AttachNetworkInterfaceOption) error
- func (a *OpenAPI) CreateElasticNetworkInterfaceV2(ctx context.Context, opts ...CreateNetworkInterfaceOption) (*NetworkInterface, error)
- func (a *OpenAPI) CreateNetworkInterface(ctx context.Context, opts ...CreateNetworkInterfaceOption) (*NetworkInterface, error)
- func (a *OpenAPI) CreateNetworkInterfaceV2(ctx context.Context, opts ...CreateNetworkInterfaceOption) (*NetworkInterface, error)
- func (a *OpenAPI) DeleteElasticNetworkInterface(ctx context.Context, eniID string) error
- func (a *OpenAPI) DeleteNetworkInterface(ctx context.Context, eniID string) error
- func (a *OpenAPI) DeleteNetworkInterfaceV2(ctx context.Context, eniID string) error
- func (a *OpenAPI) DescribeInstanceTypes(ctx context.Context, types []string) ([]ecs.InstanceType, error)
- func (a *OpenAPI) DescribeLeniNetworkInterface(ctx context.Context, opts ...DescribeNetworkInterfaceOption) ([]*NetworkInterface, error)
- func (a *OpenAPI) DescribeNetworkInterface(ctx context.Context, vpcID string, eniID []string, instanceID string, ...) ([]*NetworkInterface, error)
- func (a *OpenAPI) DescribeNetworkInterface2(ctx context.Context, opts ...DescribeNetworkInterfaceOption) ([]*NetworkInterface, error)
- func (a *OpenAPI) DescribeNetworkInterfaceV2(ctx context.Context, opts ...DescribeNetworkInterfaceOption) ([]*NetworkInterface, error)
- func (a *OpenAPI) DetachNetworkInterface(ctx context.Context, eniID, instanceID, trunkENIID string) error
- func (a *OpenAPI) DetachNetworkInterfaceV2(ctx context.Context, eniID, instanceID, trunkENIID string) error
- func (a *OpenAPI) GetElasticNetworkInterface(eniID string) (*eflo.Content, error)
- func (a *OpenAPI) GetNodeInfoForPod(ctx context.Context, nodeID string) (*eflo.Content, error)
- func (a *OpenAPI) ListElasticNetworkInterfaces(ctx context.Context, zoneID, nodeID, eniID string) (*eflo.Content, error)
- func (a *OpenAPI) ListLeniPrivateIPAddresses(ctx context.Context, eniID, ipName, ipAddress string) (*eflo.Content, error)
- func (a *OpenAPI) UnAssignIpv6Addresses(ctx context.Context, eniID string, ips []netip.Addr) error
- func (a *OpenAPI) UnAssignIpv6Addresses2(ctx context.Context, eniID string, ips []IPSet) error
- func (a *OpenAPI) UnAssignIpv6AddressesV2(ctx context.Context, eniID string, ips []IPSet) error
- func (a *OpenAPI) UnAssignLeniPrivateIPAddresses2(ctx context.Context, eniID string, ips []IPSet) error
- func (a *OpenAPI) UnAssignPrivateIPAddresses(ctx context.Context, eniID string, ips []netip.Addr) error
- func (a *OpenAPI) UnAssignPrivateIPAddresses2(ctx context.Context, eniID string, ips []IPSet) error
- func (a *OpenAPI) UnAssignPrivateIPAddressesV2(ctx context.Context, eniID string, ips []IPSet) error
- func (a *OpenAPI) UnassignLeniPrivateIPAddress(ctx context.Context, eniID, ipName string) error
- func (a *OpenAPI) WaitForLeniNetworkInterface(ctx context.Context, eniID string, status string, backoff wait.Backoff, ...) (*NetworkInterface, error)
- func (a *OpenAPI) WaitForNetworkInterface(ctx context.Context, eniID string, status string, backoff wait.Backoff, ...) (*NetworkInterface, error)
- func (a *OpenAPI) WaitForNetworkInterfaceV2(ctx context.Context, eniID string, status string, backoff wait.Backoff, ...) (*NetworkInterface, error)
- type RateLimiter
- type SimpleIdempotentKeyGenerator
- type VPC
Constants ¶
const ( APICreateNetworkInterface = "CreateNetworkInterface" APIDescribeNetworkInterfaces = "DescribeNetworkInterfaces" APIAttachNetworkInterface = "AttachNetworkInterface" APIDetachNetworkInterface = "DetachNetworkInterface" APIDeleteNetworkInterface = "DeleteNetworkInterface" APIAssignPrivateIPAddress = "AssignPrivateIpAddresses" APIUnAssignPrivateIPAddresses = "UnAssignPrivateIpAddresses" APIAssignIPv6Addresses = "AssignIpv6Addresses" APIUnAssignIpv6Addresses = "UnAssignIpv6Addresses" APIDescribeInstanceTypes = "DescribeInstanceTypes" )
const ( APICreateElasticNetworkInterface = "CreateElasticNetworkInterface" APIAssignLeniPrivateIPAddress = "AssignLeniPrivateIpAddress" APIDeleteElasticNetworkInterface = "DeleteElasticNetworkInterface" APIUnassignLeniPrivateIPAddress = "UnassignLeniPrivateIpAddress" APIListLeniPrivateIPAddresses = "ListLeniPrivateIpAddresses" APIListElasticNetworkInterfaces = "ListElasticNetworkInterfaces" APIGetNodeInfoForPod = "GetNodeInfoForPod" )
const ( LogFieldAPI = "api" LogFieldRequestID = "requestID" LogFieldInstanceID = "instanceID" LogFieldSecondaryIPCount = "secondaryIPCount" LogFieldENIID = "eni" LogFieldIPs = "ips" LogFieldEIPID = "eip" LogFieldPrivateIP = "privateIP" LogFieldVSwitchID = "vSwitchID" LogFieldSgID = "securityGroupID" LogFieldResourceGroupID = "resourceGroupID" )
log fields
const ( ENIStatusInUse string = "InUse" ENIStatusAvailable string = "Available" ENIStatusAttaching string = "Attaching" ENIStatusDetaching string = "Detaching" ENIStatusDeleting string = "Deleting" )
status for eni
const ( LENIStatusAvailable string = "Available" LENIStatusUnattached string = "Unattached" LENIStatusExecuting string = "Executing" LENIStatusCreateFailed string = "Create Failed" LENIStatusDeleteFailed string = "Delete Failed" LENIStatusDeleting string = "Deleting" LENIIPStatusAvailable string = "Available" )
const ( ENITypePrimary string = "Primary" ENITypeSecondary string = "Secondary" ENITypeTrunk string = "Trunk" ENITypeMember string = "Member" )
const ( ENITrafficModeRDMA string = "HighPerformance" ENITrafficModeStandard string = "Standard" )
const EIPInstanceTypeNetworkInterface = "NetworkInterface"
Variables ¶
var ErrInvalidArgs = errors.New("invalid args")
var ErrNotImplemented = errors.New("not implemented")
var LimitProviders = map[string]LimitProvider{}
Functions ¶
func LogFields ¶ added in v1.8.4
LogFields function enhances the provided logger with key-value pairs extracted from the fields of the given object.
Parameters: l - The original logr.Logger instance to be augmented with object field information. obj - An arbitrary object whose fields will be inspected for logging. Must be of a struct type.
Return Value: Returns an updated logr.Logger instance that includes key-value pairs for non-empty, non-zero fields of the input object. The original logger `l` is modified in place, and the returned logger is a reference to the same instance.
Types ¶
type AssignIPv6AddressesOption ¶ added in v1.8.4
type AssignIPv6AddressesOption interface {
ApplyAssignIPv6Addresses(*AssignIPv6AddressesOptions)
}
type AssignIPv6AddressesOptions ¶ added in v1.8.4
type AssignIPv6AddressesOptions struct {
NetworkInterfaceOptions *NetworkInterfaceOptions
Backoff *wait.Backoff
}
func (*AssignIPv6AddressesOptions) ApplyAssignIPv6Addresses ¶ added in v1.8.4
func (c *AssignIPv6AddressesOptions) ApplyAssignIPv6Addresses(options *AssignIPv6AddressesOptions)
func (*AssignIPv6AddressesOptions) Finish ¶ added in v1.8.4
func (c *AssignIPv6AddressesOptions) Finish(idempotentKeyGen IdempotentKeyGen) (*ecs.AssignIpv6AddressesRequest, func(), error)
type AssignPrivateIPAddressOption ¶ added in v1.8.4
type AssignPrivateIPAddressOption interface {
ApplyAssignPrivateIPAddress(*AssignPrivateIPAddressOptions)
}
type AssignPrivateIPAddressOptions ¶ added in v1.8.4
type AssignPrivateIPAddressOptions struct {
NetworkInterfaceOptions *NetworkInterfaceOptions
Backoff *wait.Backoff
}
func (*AssignPrivateIPAddressOptions) ApplyAssignPrivateIPAddress ¶ added in v1.8.4
func (c *AssignPrivateIPAddressOptions) ApplyAssignPrivateIPAddress(options *AssignPrivateIPAddressOptions)
func (*AssignPrivateIPAddressOptions) EFLO ¶ added in v1.13.7
func (c *AssignPrivateIPAddressOptions) EFLO(idempotentKeyGen IdempotentKeyGen) (*eflo.AssignLeniPrivateIpAddressRequest, func(), error)
func (*AssignPrivateIPAddressOptions) Finish ¶ added in v1.8.4
func (c *AssignPrivateIPAddressOptions) Finish(idempotentKeyGen IdempotentKeyGen) (*ecs.AssignPrivateIpAddressesRequest, func(), error)
type AttachNetworkInterfaceOption ¶ added in v1.13.7
type AttachNetworkInterfaceOption interface {
ApplyTo(*AttachNetworkInterfaceOptions)
}
type AttachNetworkInterfaceOptions ¶ added in v1.13.7
type AttachNetworkInterfaceOptions struct {
NetworkInterfaceID *string
InstanceID *string
TrunkNetworkInstanceID *string
NetworkCardIndex *int
Backoff *wait.Backoff
}
func (*AttachNetworkInterfaceOptions) ApplyTo ¶ added in v1.13.7
func (o *AttachNetworkInterfaceOptions) ApplyTo(in *AttachNetworkInterfaceOptions)
func (*AttachNetworkInterfaceOptions) ECS ¶ added in v1.13.7
func (o *AttachNetworkInterfaceOptions) ECS() (*ecs.AttachNetworkInterfaceRequest, error)
type CreateNetworkInterfaceOption ¶ added in v1.8.4
type CreateNetworkInterfaceOption interface {
ApplyCreateNetworkInterface(*CreateNetworkInterfaceOptions)
}
type CreateNetworkInterfaceOptions ¶ added in v1.8.4
type CreateNetworkInterfaceOptions struct {
NetworkInterfaceOptions *NetworkInterfaceOptions
Backoff *wait.Backoff
}
func (*CreateNetworkInterfaceOptions) ApplyCreateNetworkInterface ¶ added in v1.8.4
func (c *CreateNetworkInterfaceOptions) ApplyCreateNetworkInterface(options *CreateNetworkInterfaceOptions)
func (*CreateNetworkInterfaceOptions) EFLO ¶ added in v1.13.7
func (c *CreateNetworkInterfaceOptions) EFLO(idempotentKeyGen IdempotentKeyGen) (*eflo.CreateElasticNetworkInterfaceRequest, func(), error)
func (*CreateNetworkInterfaceOptions) Finish ¶ added in v1.8.4
func (c *CreateNetworkInterfaceOptions) Finish(idempotentKeyGen IdempotentKeyGen) (*ecs.CreateNetworkInterfaceRequest, func(), error)
type DescribeNetworkInterfaceOption ¶ added in v1.13.7
type DescribeNetworkInterfaceOption interface {
ApplyTo(*DescribeNetworkInterfaceOptions)
}
type DescribeNetworkInterfaceOptions ¶ added in v1.13.7
type DescribeNetworkInterfaceOptions struct {
VPCID *string
NetworkInterfaceIDs *[]string
InstanceID *string
InstanceType *string
Status *string
Tags *map[string]string
Backoff *wait.Backoff
}
func (*DescribeNetworkInterfaceOptions) ApplyTo ¶ added in v1.13.7
func (o *DescribeNetworkInterfaceOptions) ApplyTo(in *DescribeNetworkInterfaceOptions)
func (*DescribeNetworkInterfaceOptions) ECS ¶ added in v1.13.7
func (o *DescribeNetworkInterfaceOptions) ECS() *ecs.DescribeNetworkInterfacesRequest
func (*DescribeNetworkInterfaceOptions) EFLO ¶ added in v1.13.7
func (o *DescribeNetworkInterfaceOptions) EFLO() *eflo.ListElasticNetworkInterfacesRequest
type ECSLimitProvider ¶ added in v1.9.6
type ECSLimitProvider struct {
// contains filtered or unexported fields
}
func NewECSLimitProvider ¶ added in v1.9.6
func NewECSLimitProvider() *ECSLimitProvider
func (*ECSLimitProvider) GetLimit ¶ added in v1.9.6
func (d *ECSLimitProvider) GetLimit(client interface{}, instanceType string) (*Limits, error)
func (*ECSLimitProvider) GetLimitFromAnno ¶ added in v1.9.6
func (d *ECSLimitProvider) GetLimitFromAnno(anno map[string]string) (*Limits, error)
type EfloLimitProvider ¶ added in v1.9.6
type EfloLimitProvider struct{}
func NewEfloLimitProvider ¶ added in v1.9.6
func NewEfloLimitProvider() *EfloLimitProvider
func (*EfloLimitProvider) GetLimit ¶ added in v1.9.6
func (e *EfloLimitProvider) GetLimit(client interface{}, instanceType string) (*Limits, error)
func (*EfloLimitProvider) GetLimitFromAnno ¶ added in v1.9.6
func (e *EfloLimitProvider) GetLimitFromAnno(anno map[string]string) (*Limits, error)
type IdempotentKeyGen ¶ added in v1.8.4
type LimitConfig ¶ added in v1.10.0
func FromMap ¶ added in v1.10.0
func FromMap(in map[string]int) LimitConfig
type LimitProvider ¶ added in v1.9.6
type Limits ¶ added in v1.8.0
type Limits struct {
InstanceTypeID string
// Adapters specifies the maximum number of interfaces that can be
// attached to the instance
Adapters int
// TotalAdapters maximum number of interfaces that can be
// attached to the instance
TotalAdapters int
// IPv4PerAdapter is the maximum number of ipv4 addresses per adapter/interface
IPv4PerAdapter int
// IPv6PerAdapter is the maximum number of ipv6 addresses per adapter/interface
IPv6PerAdapter int
// MemberAdapterLimit is the number interfaces that type is member
MemberAdapterLimit int
// MaxMemberAdapterLimit is the limit to use member
MaxMemberAdapterLimit int
// ERdmaAdapters specifies the maximum number of erdma interfaces
ERdmaAdapters int
InstanceBandwidthRx int
InstanceBandwidthTx int
NetworkCards []NetworkCard
}
Limits specifies the IPAM relevant instance limits
func (*Limits) ExclusiveENIPod ¶ added in v1.8.0
func (*Limits) MaximumTrunkPod ¶ added in v1.8.0
func (*Limits) MultiIPPod ¶ added in v1.8.0
func (*Limits) SupportIPv6 ¶ added in v1.8.0
func (*Limits) SupportMultiIPIPv6 ¶ added in v1.8.0
type NetworkCard ¶ added in v1.13.7
type NetworkCard struct {
Index int
}
type NetworkInterface ¶ added in v1.4.1
type NetworkInterface struct {
Status string `json:"status,omitempty"`
MacAddress string `json:"mac_address,omitempty"`
NetworkInterfaceID string `json:"network_interface_id,omitempty"`
VPCID string `json:"vpc_ic,omitempty"`
VSwitchID string `json:"v_switch_id,omitempty"`
PrivateIPAddress string `json:"private_ip_address,omitempty"`
PrivateIPSets []IPSet `json:"private_ip_sets"`
ZoneID string `json:"zone_id,omitempty"`
SecurityGroupIDs []string `json:"security_group_ids,omitempty"`
ResourceGroupID string `json:"resource_group_id,omitempty"`
IPv6Set []IPSet `json:"ipv6_set,omitempty"`
Tags []ecs.Tag `json:"tags,omitempty"`
// fields for DescribeNetworkInterface
Type string `json:"type,omitempty"`
InstanceID string `json:"instance_id,omitempty"`
TrunkNetworkInterfaceID string `json:"trunk_network_interface_id,omitempty"`
NetworkInterfaceTrafficMode string `json:"network_interface_traffic_mode"`
DeviceIndex int `json:"device_index,omitempty"`
CreationTime string `json:"creation_time,omitempty"`
}
NetworkInterface openAPI result for ecs.CreateNetworkInterfaceResponse and ecs.NetworkInterfaceSet
func FromCreateResp ¶ added in v1.4.1
func FromCreateResp(in *ecs.CreateNetworkInterfaceResponse) *NetworkInterface
func FromDescribeResp ¶ added in v1.4.1
func FromDescribeResp(in *ecs.NetworkInterfaceSet) *NetworkInterface
type NetworkInterfaceOptions ¶ added in v1.8.4
type NetworkInterfaceOptions struct {
Trunk bool
ERDMA bool
VSwitchID string
SecurityGroupIDs []string
ResourceGroupID string
IPCount int
IPv6Count int
Tags map[string]string
InstanceID string
InstanceType string
Status string
NetworkInterfaceID string
DeleteENIOnECSRelease *bool
SourceDestCheck *bool
ZoneID string
}
NetworkInterfaceOptions represents the common options for network interface operations.
type OpenAPI ¶
type OpenAPI struct {
ClientSet credential.Client
IdempotentKeyGen IdempotentKeyGen
RateLimiter *RateLimiter
Tracer trace.Tracer
}
func New ¶
func New(c credential.Client, cfg LimitConfig) (*OpenAPI, error)
func (*OpenAPI) AssignIpv6Addresses ¶
func (a *OpenAPI) AssignIpv6Addresses(ctx context.Context, opts ...AssignIPv6AddressesOption) ([]netip.Addr, error)
AssignIpv6Addresses assign ipv6 address
func (*OpenAPI) AssignIpv6Addresses2 ¶ added in v1.13.7
func (a *OpenAPI) AssignIpv6Addresses2(ctx context.Context, opts ...AssignIPv6AddressesOption) ([]IPSet, error)
AssignIpv6Addresses2 assign ipv6 address
func (*OpenAPI) AssignIpv6AddressesV2 ¶ added in v1.13.7
func (*OpenAPI) AssignLeniPrivateIPAddress ¶ added in v1.8.0
func (*OpenAPI) AssignLeniPrivateIPAddress2 ¶ added in v1.13.7
func (*OpenAPI) AssignPrivateIPAddress ¶
func (*OpenAPI) AssignPrivateIPAddress2 ¶ added in v1.13.7
func (*OpenAPI) AssignPrivateIPAddressV2 ¶ added in v1.13.7
func (*OpenAPI) AttachNetworkInterface ¶
func (a *OpenAPI) AttachNetworkInterface(ctx context.Context, opts ...AttachNetworkInterfaceOption) error
AttachNetworkInterface attach eni
func (*OpenAPI) AttachNetworkInterfaceV2 ¶ added in v1.13.7
func (a *OpenAPI) AttachNetworkInterfaceV2(ctx context.Context, opts ...AttachNetworkInterfaceOption) error
func (*OpenAPI) CreateElasticNetworkInterfaceV2 ¶ added in v1.13.7
func (a *OpenAPI) CreateElasticNetworkInterfaceV2(ctx context.Context, opts ...CreateNetworkInterfaceOption) (*NetworkInterface, error)
func (*OpenAPI) CreateNetworkInterface ¶
func (a *OpenAPI) CreateNetworkInterface(ctx context.Context, opts ...CreateNetworkInterfaceOption) (*NetworkInterface, error)
func (*OpenAPI) CreateNetworkInterfaceV2 ¶ added in v1.13.7
func (a *OpenAPI) CreateNetworkInterfaceV2(ctx context.Context, opts ...CreateNetworkInterfaceOption) (*NetworkInterface, error)
func (*OpenAPI) DeleteElasticNetworkInterface ¶ added in v1.8.0
func (*OpenAPI) DeleteNetworkInterface ¶
DeleteNetworkInterface del eni by id
func (*OpenAPI) DeleteNetworkInterfaceV2 ¶ added in v1.13.7
func (*OpenAPI) DescribeInstanceTypes ¶ added in v1.3.0
func (*OpenAPI) DescribeLeniNetworkInterface ¶ added in v1.13.7
func (a *OpenAPI) DescribeLeniNetworkInterface(ctx context.Context, opts ...DescribeNetworkInterfaceOption) ([]*NetworkInterface, error)
func (*OpenAPI) DescribeNetworkInterface ¶
func (a *OpenAPI) DescribeNetworkInterface(ctx context.Context, vpcID string, eniID []string, instanceID string, instanceType string, status string, tags map[string]string) ([]*NetworkInterface, error)
DescribeNetworkInterface list eni
func (*OpenAPI) DescribeNetworkInterface2 ¶ added in v1.13.7
func (a *OpenAPI) DescribeNetworkInterface2(ctx context.Context, opts ...DescribeNetworkInterfaceOption) ([]*NetworkInterface, error)
DescribeNetworkInterface2 list eni
func (*OpenAPI) DescribeNetworkInterfaceV2 ¶ added in v1.13.7
func (a *OpenAPI) DescribeNetworkInterfaceV2(ctx context.Context, opts ...DescribeNetworkInterfaceOption) ([]*NetworkInterface, error)
func (*OpenAPI) DetachNetworkInterface ¶
func (a *OpenAPI) DetachNetworkInterface(ctx context.Context, eniID, instanceID, trunkENIID string) error
DetachNetworkInterface detach eni
func (*OpenAPI) DetachNetworkInterfaceV2 ¶ added in v1.13.7
func (*OpenAPI) GetElasticNetworkInterface ¶ added in v1.8.0
func (*OpenAPI) GetNodeInfoForPod ¶ added in v1.8.0
func (*OpenAPI) ListElasticNetworkInterfaces ¶ added in v1.8.0
func (*OpenAPI) ListLeniPrivateIPAddresses ¶ added in v1.8.0
func (*OpenAPI) UnAssignIpv6Addresses ¶
UnAssignIpv6Addresses remove ip from eni return ok if 1. eni is released 2. ip is already released 3. release success
func (*OpenAPI) UnAssignIpv6Addresses2 ¶ added in v1.13.7
UnAssignIpv6Addresses2 remove ip from eni return ok if 1. eni is released 2. ip is already released 3. release success
func (*OpenAPI) UnAssignIpv6AddressesV2 ¶ added in v1.13.7
func (*OpenAPI) UnAssignLeniPrivateIPAddresses2 ¶ added in v1.13.7
func (*OpenAPI) UnAssignPrivateIPAddresses ¶
func (a *OpenAPI) UnAssignPrivateIPAddresses(ctx context.Context, eniID string, ips []netip.Addr) error
UnAssignPrivateIPAddresses remove ip from eni return ok if 1. eni is released 2. ip is already released 3. release success for primaryIP err is InvalidIp.IpUnassigned
func (*OpenAPI) UnAssignPrivateIPAddresses2 ¶ added in v1.13.7
func (*OpenAPI) UnAssignPrivateIPAddressesV2 ¶ added in v1.13.7
func (*OpenAPI) UnassignLeniPrivateIPAddress ¶ added in v1.8.0
func (*OpenAPI) WaitForLeniNetworkInterface ¶ added in v1.13.7
func (a *OpenAPI) WaitForLeniNetworkInterface(ctx context.Context, eniID string, status string, backoff wait.Backoff, ignoreNotExist bool) (*NetworkInterface, error)
WaitForLeniNetworkInterface wait status of eni
type RateLimiter ¶ added in v1.10.0
type RateLimiter struct {
// contains filtered or unexported fields
}
func NewRateLimiter ¶ added in v1.10.0
func NewRateLimiter(cfg LimitConfig) *RateLimiter
type SimpleIdempotentKeyGenerator ¶ added in v1.8.4
type SimpleIdempotentKeyGenerator struct {
// contains filtered or unexported fields
}
SimpleIdempotentKeyGenerator implements the generation and management of idempotency keys.
func NewIdempotentKeyGenerator ¶ added in v1.8.4
func NewIdempotentKeyGenerator() *SimpleIdempotentKeyGenerator
func (*SimpleIdempotentKeyGenerator) GenerateKey ¶ added in v1.8.4
func (g *SimpleIdempotentKeyGenerator) GenerateKey(paramHash string) string
GenerateKey generates an idempotency key based on the given parameter hash. multiple key is supported
func (*SimpleIdempotentKeyGenerator) PutBack ¶ added in v1.8.4
func (g *SimpleIdempotentKeyGenerator) PutBack(paramHash string, uuid string)
PutBack adds the specified idempotency key back into the cache for reuse, associating it with the given parameter hash.