engine

package
v0.0.0-...-53a8481 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2023 License: Apache-2.0 Imports: 14 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// InstanceMetadataEndpoints is the list of EC2 instance metadata endpoints.
	InstanceMetadataEndpoints = []string{"169.254.169.254/32", "fd00:ec2::254/128"}
)

Functions

func NewUnmappedMACAddressError

func NewUnmappedMACAddressError(operation string, origin string, message string) error

NewUnmappedMACAddressError creates the error UnmappedMACAddressError

Types

type Engine

type Engine interface {
	GetAllMACAddresses() ([]string, error)
	GetMACAddressOfENI(macAddresses []string, eniID string) (string, error)
	GetInterfaceDeviceName(macAddress string) (string, error)
	GetIPV4GatewayNetmask(macAddress string) (string, string, error)
	GetIPV6PrefixLength(macAddress string) (string, error)
	GetIPV6Gateway(deviceName string) (string, error)
	DoesMACAddressMapToIPV4Address(macAddress string, ipv4Address string) (bool, error)
	DoesMACAddressMapToIPV6Address(macAddress string, ipv4Address string) (bool, error)
	SetupContainerNamespace(args *skel.CmdArgs, deviceName string, macAddress string,
		ipAddresses []string, gatewayAddresses []string,
		blockIMDS bool, stayDown bool, mtu int) error
	TeardownContainerNamespace(netns string, macAddress string) error
}

Engine represents the execution engine for the ENI plugin. It defines all the operations performed by the plugin

func New

func New() Engine

New creates a new Engine object

type IsUnmappedMACAddressError

type IsUnmappedMACAddressError interface {
	IsUnmappedMACAddressError() bool
}

IsUnmappedMACAddressError defines the interface representing the error UnmappedMACAddressError

type UnmappedMACAddressError

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

UnmappedMACAddressError is used to indicate that the MAC address of the ENI cannot be mapped to any of the network interfaces attached to the host as determined by the instance metadata

func (*UnmappedMACAddressError) Error

func (macErr *UnmappedMACAddressError) Error() string

func (*UnmappedMACAddressError) IsUnmappedMACAddressError

func (macErr *UnmappedMACAddressError) IsUnmappedMACAddressError() bool

IsUnmappedMACAddressError returns whether the error is UnmappedMACAddressError

Directories

Path Synopsis
Package mock_engine is a generated GoMock package.
Package mock_engine is a generated GoMock package.

Jump to

Keyboard shortcuts

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