Version: v1.10.4 Latest Latest

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

Go to latest
Published: Sep 1, 2021 License: Apache-2.0 Imports: 9 Imported by: 0




This section is empty.


This section is empty.


This section is empty.


type API

type API struct {
	// contains filtered or unexported fields

func NewAPI

func NewAPI(subnets []*ipamTypes.Subnet, vpcs []*ipamTypes.VirtualNetwork, securityGroups []*types.SecurityGroup) *API

NewAPI returns a new mocked ECS API

func (*API) AssignPrivateIPAddresses

func (a *API) AssignPrivateIPAddresses(ctx context.Context, eniID string, toAllocate int) ([]string, error)

func (*API) AttachNetworkInterface

func (a *API) AttachNetworkInterface(ctx context.Context, instanceID, eniID string) error

func (*API) CreateNetworkInterface

func (a *API) CreateNetworkInterface(ctx context.Context, secondaryPrivateIPCount int, vSwitchID string, groups []string, tags map[string]string) (string, *eniTypes.ENI, error)

func (*API) DeleteNetworkInterface

func (a *API) DeleteNetworkInterface(ctx context.Context, eniID string) error

func (*API) GetInstances

func (a *API) GetInstances(ctx context.Context, vpcs ipamTypes.VirtualNetworkMap, subnets ipamTypes.SubnetMap) (*ipamTypes.InstanceMap, error)

func (*API) GetSecurityGroups

func (a *API) GetSecurityGroups(ctx context.Context) (types.SecurityGroupMap, error)

func (*API) GetVPC

func (a *API) GetVPC(ctx context.Context, vpcID string) (*ipamTypes.VirtualNetwork, error)

func (*API) GetVPCs

func (a *API) GetVPCs(ctx context.Context) (ipamTypes.VirtualNetworkMap, error)

func (*API) GetVSwitches

func (a *API) GetVSwitches(ctx context.Context) (ipamTypes.SubnetMap, error)

func (*API) UnassignPrivateIPAddresses

func (a *API) UnassignPrivateIPAddresses(ctx context.Context, eniID string, addresses []string) error

func (*API) UpdateENIs

func (a *API) UpdateENIs(enis map[string]ENIMap)

UpdateENIs replaces the ENIs which the mock API will return

func (*API) UpdateSecurityGroups

func (a *API) UpdateSecurityGroups(securityGroups []*types.SecurityGroup)

UpdateSecurityGroups replaces the security groups which the mock API will return

func (*API) UpdateSubnets

func (a *API) UpdateSubnets(subnets []*ipamTypes.Subnet)

UpdateSubnets replaces the subents which the mock API will return

func (*API) WaitENIAttached

func (a *API) WaitENIAttached(ctx context.Context, eniID string) (string, error)

type ENIMap

type ENIMap map[string]*eniTypes.ENI

ENIMap is a map of ENI interfaced indexed by ENI ID

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL