ops

package
v1.16.6 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLogger

func GetLogger(ctx context.Context, eniID string) logr.Logger

GetLogger returns a logger with ENI context

Types

type Executor

type Executor struct {
	// contains filtered or unexported fields
}

Executor provides shared ENI operation primitives for both Pool controller (shared ENI) and ENI controller (exclusive ENI)

func NewExecutor

func NewExecutor(aliyun aliyunClient.OpenAPI, tracer trace.Tracer) *Executor

NewExecutor creates a new ENI operation executor

func (*Executor) AttachAndWait

func (e *Executor) AttachAndWait(ctx context.Context, eniID, instanceID, trunkENIID string) (*aliyunClient.NetworkInterface, error)

AttachAndWait attaches ENI and waits for it to be ready (blocking) Used by ENI controller for synchronous ENI attach

func (*Executor) AttachAsync

func (e *Executor) AttachAsync(ctx context.Context, eniID, instanceID, trunkENIID string) error

AttachAsync initiates attach and returns immediately (non-blocking) Used by Pool controller for async ENI attach

func (*Executor) CheckStatus

func (e *Executor) CheckStatus(ctx context.Context, eniID string) (*aliyunClient.NetworkInterface, error)

CheckStatus checks the current status of an ENI

func (*Executor) Delete

func (e *Executor) Delete(ctx context.Context, eniID string) error

Delete deletes an ENI

func (*Executor) DetachAndWait

func (e *Executor) DetachAndWait(ctx context.Context, eniID, instanceID, trunkENIID string) error

DetachAndWait detaches ENI and waits for it to be available (blocking)

func (*Executor) DetachAsync

func (e *Executor) DetachAsync(ctx context.Context, eniID, instanceID, trunkENIID string) error

DetachAsync initiates detach and returns immediately (non-blocking)

func (*Executor) GetInitialDelay

func (e *Executor) GetInitialDelay(eniID string) time.Duration

GetInitialDelay returns the initial delay before checking status based on ENI type

func (*Executor) GetTimeout

func (e *Executor) GetTimeout(eniID string) time.Duration

GetTimeout returns the attach timeout based on ENI type

func (*Executor) WaitForStatus

func (e *Executor) WaitForStatus(ctx context.Context, eniID, status string) (*aliyunClient.NetworkInterface, error)

WaitForStatus waits for ENI to reach the specified status

Jump to

Keyboard shortcuts

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