Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeallocateIP ¶
DeallocateIP releases an IP back to AWS
func RemoveInterface ¶
RemoveInterface gracefull shutdown and removal of interfaces Simply detach the interface, wait for it to come down and then removes.
Types ¶
type AllocationResult ¶
AllocationResult contains a net.IP / Interface pair
func AllocateIPFirstAvailable ¶
func AllocateIPFirstAvailable() (*AllocationResult, error)
AllocateIPFirstAvailable allocates an IP address on the first available IP address Returns a reference to the interface the IP was allocated on
func AllocateIPFirstAvailableAtIndex ¶
func AllocateIPFirstAvailableAtIndex(index int) (*AllocationResult, error)
AllocateIPFirstAvailableAtIndex allocates an IP address, skipping any adapter < the given index Returns a reference to the interface the IP was allocated on
func AllocateIPOn ¶
func AllocateIPOn(intf Interface) (*AllocationResult, error)
AllocateIPOn allocates an IP on a specific interface.
type ENILimit ¶
ENILimit contains limits for adapter count and addresses
func ENILimits ¶
func ENILimits() ENILimit
ENILimits returns the limits based on the system's instance type
func ENILimitsForInstanceType ¶
ENILimitsForInstanceType returns the limits for ENI for an instance type Returns a zero-limit for unknown instance types
type Interface ¶
type Interface struct { ID string Mac string Number int IPv4s []net.IP SubnetID string SubnetCidr *net.IPNet VpcID string VpcPrimaryCidr *net.IPNet VpcCidrs []*net.IPNet SecurityGroupIds []string }
Interface describes an interface from the metadata service
func GetInterfaces ¶
GetInterfaces returns a list of configured interfaces
func NewInterface ¶
NewInterface creates an Interface based on specified parameters
func NewInterfaceOnSubnetAtIndex ¶
NewInterfaceOnSubnetAtIndex creates a new Interface with a specified subnet and index
type Interfaces ¶
type Interfaces []Interface
Interfaces contains a slice of Interface
func (Interfaces) Len ¶
func (a Interfaces) Len() int
func (Interfaces) Less ¶
func (a Interfaces) Less(i, j int) bool
func (Interfaces) Swap ¶
func (a Interfaces) Swap(i, j int)
type Subnet ¶
type Subnet struct { ID string Cidr string IsDefault bool AvailableAddressCount int Name string Tags map[string]string }
Subnet contains attributes of a subnet
func GetSubnetsForInstance ¶
GetSubnetsForInstance returns a list of subnets for the running instance
type SubnetsByAvailableAddressCount ¶
type SubnetsByAvailableAddressCount []Subnet
SubnetsByAvailableAddressCount contains a list of subnet
func (SubnetsByAvailableAddressCount) Len ¶
func (a SubnetsByAvailableAddressCount) Len() int
func (SubnetsByAvailableAddressCount) Less ¶
func (a SubnetsByAvailableAddressCount) Less(i, j int) bool
func (SubnetsByAvailableAddressCount) Swap ¶
func (a SubnetsByAvailableAddressCount) Swap(i, j int)