Documentation ¶
Index ¶
- Constants
- func ElectENIIPv6PrimaryIP(newObj *ccev2.ENI)
- func EnsureSubnet(vpcID, sbnID string) (*ccev1.Subnet, error)
- func SearchSubnetID(vpcID, defaultSbnID, privateIPStr string) string
- type SyncManager
- type VPCENISyncer
- func (es *VPCENISyncer) Create(resource *ccev2.ENI) error
- func (es *VPCENISyncer) Delete(name string) error
- func (es *VPCENISyncer) Init(ctx context.Context) error
- func (es *VPCENISyncer) ResyncENI(ctx context.Context) time.Duration
- func (es *VPCENISyncer) StartENISyncer(ctx context.Context, updater syncer.ENIUpdater) syncer.ENIEventHandler
- func (es *VPCENISyncer) Update(resource *ccev2.ENI) error
- type VPCSubnetSyncher
- func (ss VPCSubnetSyncher) Create(resource *ccev1.Subnet) error
- func (ss VPCSubnetSyncher) Delete(name string) error
- func (ss *VPCSubnetSyncher) Init(ctx context.Context) error
- func (ss VPCSubnetSyncher) ResyncSubnet(context.Context) time.Duration
- func (ss VPCSubnetSyncher) StartSubnetSyncher(ctx context.Context, updater syncer.SubnetUpdater) syncer.SubnetEventHandler
- func (ss VPCSubnetSyncher) Update(resource *ccev1.Subnet) error
Constants ¶
View Source
const ( ENIReadyTimeToAttach = 5 * time.Second ENIMaxCreateDuration = 5 * time.Minute FinalizerENI = "eni-syncer" )
Variables ¶
This section is empty.
Functions ¶
func ElectENIIPv6PrimaryIP ¶
ElectENIIPv6PrimaryIP elect a ipv6 primary ip for eni set primary ip for IPv6 if not set by default, all IPv6 IPs are secondary IPs
func SearchSubnetID ¶
Search the subnet ID of the IP address
Types ¶
type SyncManager ¶
type SyncManager[T eni.Eni | vpc.RouteRule | vpc.Subnet | bbc.GetInstanceEniResult] struct { sync.Mutex Name string // contains filtered or unexported fields }
SyncManager synchronize data between k8s and VPC, run in operator
func NewSyncManager ¶
func (*SyncManager[T]) AddItems ¶
func (s *SyncManager[T]) AddItems(dataList []T)
func (*SyncManager[T]) Get ¶
func (s *SyncManager[T]) Get(key string) *T
func (*SyncManager[T]) Run ¶
func (s *SyncManager[T]) Run()
func (*SyncManager[T]) RunImmediately ¶
func (s *SyncManager[T]) RunImmediately()
type VPCENISyncer ¶
type VPCENISyncer struct {
// contains filtered or unexported fields
}
VPCENISyncer only work with single vpc cluster
func (*VPCENISyncer) Create ¶
func (es *VPCENISyncer) Create(resource *ccev2.ENI) error
Create implements syncer.ENIEventHandler
func (*VPCENISyncer) Delete ¶
func (es *VPCENISyncer) Delete(name string) error
Delete implements syncer.ENIEventHandler
func (*VPCENISyncer) Init ¶
func (es *VPCENISyncer) Init(ctx context.Context) error
NewVPCENISyncer create a new VPCENISyncer
func (*VPCENISyncer) ResyncENI ¶
func (es *VPCENISyncer) ResyncENI(ctx context.Context) time.Duration
ResyncENI implements syncer.ENIEventHandler
func (*VPCENISyncer) StartENISyncer ¶
func (es *VPCENISyncer) StartENISyncer(ctx context.Context, updater syncer.ENIUpdater) syncer.ENIEventHandler
StartENISyncer implements syncer.ENISyncher
type VPCSubnetSyncher ¶
type VPCSubnetSyncher struct {
// contains filtered or unexported fields
}
func (VPCSubnetSyncher) Create ¶
Create Process synchronization of new subnets For a new subnet, we should generally query the details of the subnet directly and synchronously
func (VPCSubnetSyncher) ResyncSubnet ¶
func (VPCSubnetSyncher) StartSubnetSyncher ¶
func (ss VPCSubnetSyncher) StartSubnetSyncher(ctx context.Context, updater syncer.SubnetUpdater) syncer.SubnetEventHandler
Click to show internal directories.
Click to hide internal directories.