Documentation ¶
Index ¶
- Constants
- func GetInterfaceByIdxWithRetries(ctx context.Context, session *EC2Session, instance *ec2.Instance, ...) (*ec2.InstanceNetworkInterface, error)
- func HandleEC2Error(err error, span *trace.Span) error
- func IsAWSErr(err error) bool
- func IsErrInterfaceByIdxNotFound(err error) bool
- func IsRequestFailure(err error) bool
- func RegionFromAZ(az string) string
- func RetrieveEC2Error(err error) awserr.Error
- func RetrieveRequestFailure(err error) awserr.RequestFailure
- func WrapEC2Error(err error) error
- type BatchDescriber
- type BatchENIDescriber
- func (b *BatchENIDescriber) DescribeNetworkInterfaces(ctx context.Context, networkInterfaceID string) (*ec2.NetworkInterface, error)
- func (b *BatchENIDescriber) DescribeNetworkInterfacesWithTimeout(ctx context.Context, networkInterfaceID string, deadline time.Duration) (*ec2.NetworkInterface, error)
- type BatchInstanceDescriber
- type EC2InstanceCacheValue
- type EC2Session
- func (s *EC2Session) AssignIPv6Addresses(ctx context.Context, assignIpv6AddressesInput ec2.AssignIpv6AddressesInput) (*ec2.AssignIpv6AddressesOutput, error)
- func (s *EC2Session) AssignPrivateIPAddresses(ctx context.Context, ...) (*ec2.AssignPrivateIpAddressesOutput, error)
- func (s *EC2Session) AssociateAddress(ctx context.Context, input ec2.AssociateAddressInput) (*ec2.AssociateAddressOutput, error)
- func (s *EC2Session) AssociateTrunkInterface(ctx context.Context, input ec2.AssociateTrunkInterfaceInput) (*ec2.AssociateTrunkInterfaceOutput, error)
- func (s *EC2Session) AttachNetworkInterface(ctx context.Context, input ec2.AttachNetworkInterfaceInput) (*ec2.AttachNetworkInterfaceOutput, error)
- func (s *EC2Session) CreateNetworkInterface(ctx context.Context, input ec2.CreateNetworkInterfaceInput) (*ec2.CreateNetworkInterfaceOutput, error)
- func (s *EC2Session) CreateNetworkInterfacePermission(ctx context.Context, input ec2.CreateNetworkInterfacePermissionInput) (*ec2.CreateNetworkInterfacePermissionOutput, error)
- func (s *EC2Session) CreateSubnetCidrReservation(ctx context.Context, input ec2.CreateSubnetCidrReservationInput) (*ec2.CreateSubnetCidrReservationOutput, error)
- func (s *EC2Session) DeleteNetworkInterface(ctx context.Context, input ec2.DeleteNetworkInterfaceInput) (*ec2.DeleteNetworkInterfaceOutput, error)
- func (s *EC2Session) DeleteSubnetCidrReservation(ctx context.Context, input ec2.DeleteSubnetCidrReservationInput) (*ec2.DeleteSubnetCidrReservationOutput, error)
- func (s *EC2Session) DescribeNetworkInterfaces(ctx context.Context, input ec2.DescribeNetworkInterfacesInput) (*ec2.DescribeNetworkInterfacesOutput, error)
- func (s *EC2Session) DescribeSecurityGroups(ctx context.Context, input ec2.DescribeSecurityGroupsInput) (*ec2.DescribeSecurityGroupsOutput, error)
- func (s *EC2Session) DescribeTrunkInterfaceAssociations(ctx context.Context, input ec2.DescribeTrunkInterfaceAssociationsInput) (*ec2.DescribeTrunkInterfaceAssociationsOutput, error)
- func (s *EC2Session) DisassociateAddress(ctx context.Context, input ec2.DisassociateAddressInput) (*ec2.DisassociateAddressOutput, error)
- func (s *EC2Session) DisassociateTrunkInterface(ctx context.Context, input ec2.DisassociateTrunkInterfaceInput) (*ec2.DisassociateTrunkInterfaceOutput, error)
- func (s *EC2Session) GetDefaultSecurityGroups(ctx context.Context, vpcID string) ([]*string, error)
- func (s *EC2Session) GetInstance(ctx context.Context, instanceID string, invalidateCache bool) (*ec2.Instance, string, error)
- func (s *EC2Session) GetNetworkInterfaceByID(ctx context.Context, networkInterfaceID string, deadline time.Duration) (*ec2.NetworkInterface, error)
- func (s *EC2Session) GetRouteTables(ctx context.Context) ([]*ec2.RouteTable, error)
- func (s *EC2Session) GetSubnetCidrReservations(ctx context.Context, subnet string) ([]*ec2.SubnetCidrReservation, error)
- func (s *EC2Session) ModifyNetworkInterfaceAttribute(ctx context.Context, input ec2.ModifyNetworkInterfaceAttributeInput) (*ec2.ModifyNetworkInterfaceAttributeOutput, error)
- func (s *EC2Session) Region(ctx context.Context) (string, error)
- func (s *EC2Session) UnassignIpv6Addresses(ctx context.Context, unassignIpv6AddressesInput ec2.UnassignIpv6AddressesInput) (*ec2.UnassignIpv6AddressesOutput, error)
- func (s *EC2Session) UnassignPrivateIPAddresses(ctx context.Context, ...) (*ec2.UnassignPrivateIpAddressesOutput, error)
- type EC2SessionManager
- type ErrInterfaceByIdxNotFound
- type Key
Constants ¶
View Source
const ( InvalidNetworkInterfaceIDNotFound = "InvalidNetworkInterfaceID.NotFound" InvalidAssociationIDNotFound = "InvalidAssociationID.NotFound" InvalidGroupNotFound = "InvalidGroup.NotFound" InvalidGroupIDMalformed = "InvalidGroupId.Malformed" InvalidSubnetIDNotFound = "InvalidSubnetID.NotFound" InvalidInstanceIDNotFound = "InvalidInstanceID.NotFound" ClientRequestLimitExceeded = "Client.RequestLimitExceeded" )
Variables ¶
This section is empty.
Functions ¶
func GetInterfaceByIdxWithRetries ¶
func GetInterfaceByIdxWithRetries(ctx context.Context, session *EC2Session, instance *ec2.Instance, deviceIdx uint32) (*ec2.InstanceNetworkInterface, error)
func HandleEC2Error ¶
Sets the span to the status of the EC2 errors, and returns a wrapped error
func IsRequestFailure ¶
func RetrieveEC2Error ¶
func RetrieveRequestFailure ¶
func RetrieveRequestFailure(err error) awserr.RequestFailure
func WrapEC2Error ¶
Returns an error, with aspects from the vpcerrors library
Types ¶
type BatchDescriber ¶
type BatchDescriber struct {
// contains filtered or unexported fields
}
type BatchENIDescriber ¶
type BatchENIDescriber struct {
BatchDescriber
}
func NewBatchENIDescriber ¶
func NewBatchENIDescriber( ctx context.Context, maxDeadline time.Duration, maxItems int, session *session.Session, newEC2 func(p client.ConfigProvider, cfgs ...*aws.Config) ec2iface.EC2API) *BatchENIDescriber
TODO: This currently leaks goroutines.
func (*BatchENIDescriber) DescribeNetworkInterfaces ¶
func (b *BatchENIDescriber) DescribeNetworkInterfaces(ctx context.Context, networkInterfaceID string) (*ec2.NetworkInterface, error)
func (*BatchENIDescriber) DescribeNetworkInterfacesWithTimeout ¶
func (b *BatchENIDescriber) DescribeNetworkInterfacesWithTimeout(ctx context.Context, networkInterfaceID string, deadline time.Duration) (*ec2.NetworkInterface, error)
type BatchInstanceDescriber ¶
type BatchInstanceDescriber struct {
BatchDescriber
}
type EC2InstanceCacheValue ¶
type EC2InstanceCacheValue struct {
// contains filtered or unexported fields
}
type EC2Session ¶
func (*EC2Session) AssignIPv6Addresses ¶
func (s *EC2Session) AssignIPv6Addresses(ctx context.Context, assignIpv6AddressesInput ec2.AssignIpv6AddressesInput) (*ec2.AssignIpv6AddressesOutput, error)
func (*EC2Session) AssignPrivateIPAddresses ¶
func (s *EC2Session) AssignPrivateIPAddresses(ctx context.Context, assignPrivateIPAddressesInput ec2.AssignPrivateIpAddressesInput) (*ec2.AssignPrivateIpAddressesOutput, error)
func (*EC2Session) AssociateAddress ¶
func (s *EC2Session) AssociateAddress(ctx context.Context, input ec2.AssociateAddressInput) (*ec2.AssociateAddressOutput, error)
func (*EC2Session) AssociateTrunkInterface ¶
func (s *EC2Session) AssociateTrunkInterface(ctx context.Context, input ec2.AssociateTrunkInterfaceInput) (*ec2.AssociateTrunkInterfaceOutput, error)
func (*EC2Session) AttachNetworkInterface ¶
func (s *EC2Session) AttachNetworkInterface(ctx context.Context, input ec2.AttachNetworkInterfaceInput) (*ec2.AttachNetworkInterfaceOutput, error)
func (*EC2Session) CreateNetworkInterface ¶
func (s *EC2Session) CreateNetworkInterface(ctx context.Context, input ec2.CreateNetworkInterfaceInput) (*ec2.CreateNetworkInterfaceOutput, error)
func (*EC2Session) CreateNetworkInterfacePermission ¶
func (s *EC2Session) CreateNetworkInterfacePermission(ctx context.Context, input ec2.CreateNetworkInterfacePermissionInput) (*ec2.CreateNetworkInterfacePermissionOutput, error)
func (*EC2Session) CreateSubnetCidrReservation ¶
func (s *EC2Session) CreateSubnetCidrReservation(ctx context.Context, input ec2.CreateSubnetCidrReservationInput) (*ec2.CreateSubnetCidrReservationOutput, error)
func (*EC2Session) DeleteNetworkInterface ¶
func (s *EC2Session) DeleteNetworkInterface(ctx context.Context, input ec2.DeleteNetworkInterfaceInput) (*ec2.DeleteNetworkInterfaceOutput, error)
func (*EC2Session) DeleteSubnetCidrReservation ¶
func (s *EC2Session) DeleteSubnetCidrReservation(ctx context.Context, input ec2.DeleteSubnetCidrReservationInput) (*ec2.DeleteSubnetCidrReservationOutput, error)
func (*EC2Session) DescribeNetworkInterfaces ¶
func (s *EC2Session) DescribeNetworkInterfaces(ctx context.Context, input ec2.DescribeNetworkInterfacesInput) (*ec2.DescribeNetworkInterfacesOutput, error)
func (*EC2Session) DescribeSecurityGroups ¶
func (s *EC2Session) DescribeSecurityGroups(ctx context.Context, input ec2.DescribeSecurityGroupsInput) (*ec2.DescribeSecurityGroupsOutput, error)
func (*EC2Session) DescribeTrunkInterfaceAssociations ¶
func (s *EC2Session) DescribeTrunkInterfaceAssociations(ctx context.Context, input ec2.DescribeTrunkInterfaceAssociationsInput) (*ec2.DescribeTrunkInterfaceAssociationsOutput, error)
func (*EC2Session) DisassociateAddress ¶
func (s *EC2Session) DisassociateAddress(ctx context.Context, input ec2.DisassociateAddressInput) (*ec2.DisassociateAddressOutput, error)
func (*EC2Session) DisassociateTrunkInterface ¶
func (s *EC2Session) DisassociateTrunkInterface(ctx context.Context, input ec2.DisassociateTrunkInterfaceInput) (*ec2.DisassociateTrunkInterfaceOutput, error)
func (*EC2Session) GetDefaultSecurityGroups ¶
func (*EC2Session) GetInstance ¶
func (*EC2Session) GetNetworkInterfaceByID ¶
func (s *EC2Session) GetNetworkInterfaceByID(ctx context.Context, networkInterfaceID string, deadline time.Duration) (*ec2.NetworkInterface, error)
func (*EC2Session) GetRouteTables ¶
func (s *EC2Session) GetRouteTables(ctx context.Context) ([]*ec2.RouteTable, error)
func (*EC2Session) GetSubnetCidrReservations ¶
func (s *EC2Session) GetSubnetCidrReservations(ctx context.Context, subnet string) ([]*ec2.SubnetCidrReservation, error)
func (*EC2Session) ModifyNetworkInterfaceAttribute ¶
func (s *EC2Session) ModifyNetworkInterfaceAttribute(ctx context.Context, input ec2.ModifyNetworkInterfaceAttributeInput) (*ec2.ModifyNetworkInterfaceAttributeOutput, error)
func (*EC2Session) UnassignIpv6Addresses ¶
func (s *EC2Session) UnassignIpv6Addresses(ctx context.Context, unassignIpv6AddressesInput ec2.UnassignIpv6AddressesInput) (*ec2.UnassignIpv6AddressesOutput, error)
func (*EC2Session) UnassignPrivateIPAddresses ¶
func (s *EC2Session) UnassignPrivateIPAddresses(ctx context.Context, unassignPrivateIPAddressesInput ec2.UnassignPrivateIpAddressesInput) (*ec2.UnassignPrivateIpAddressesOutput, error)
type EC2SessionManager ¶
type EC2SessionManager struct { // Function used to create a new STS service client NewSts func(p client.ConfigProvider, cfgs ...*aws.Config) stsiface.STSAPI // Function used to create a new EC2 service client NewEC2 func(p client.ConfigProvider, cfgs ...*aws.Config) ec2iface.EC2API // contains filtered or unexported fields }
func NewEC2SessionManager ¶
func NewEC2SessionManager(workerRole string) *EC2SessionManager
func (*EC2SessionManager) GetSessionFromAccountAndRegion ¶
func (sessionManager *EC2SessionManager) GetSessionFromAccountAndRegion(ctx context.Context, sessionKey Key) (*EC2Session, error)
func (*EC2SessionManager) GetSessionFromInstanceIdentity ¶
func (sessionManager *EC2SessionManager) GetSessionFromInstanceIdentity(ctx context.Context, instanceIdentity *vpcapi.InstanceIdentity) (*EC2Session, error)
type ErrInterfaceByIdxNotFound ¶
type ErrInterfaceByIdxNotFound struct {
// contains filtered or unexported fields
}
func (*ErrInterfaceByIdxNotFound) Error ¶
func (e *ErrInterfaceByIdxNotFound) Error() string
Click to show internal directories.
Click to hide internal directories.