fake

package
v1.7.2 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ENI

type ENI struct {
	ID string

	IPv4 sets.Set[netip.Addr]
	IPv6 sets.Set[netip.Addr]
}

type FakeFactory

type FakeFactory struct {
	sync.Mutex
	ENIS map[string]*ENI
	// contains filtered or unexported fields
}

func NewFakeFactory

func NewFakeFactory() *FakeFactory

func (*FakeFactory) AssignNIPv4

func (f *FakeFactory) AssignNIPv4(eniID string, count int, mac string) ([]netip.Addr, error)

func (*FakeFactory) AssignNIPv6

func (f *FakeFactory) AssignNIPv6(eniID string, count int, mac string) ([]netip.Addr, error)

func (*FakeFactory) CreateNetworkInterface

func (f *FakeFactory) CreateNetworkInterface(ipv4, ipv6 int, eniType string) (*daemon.ENI, []netip.Addr, []netip.Addr, error)

func (*FakeFactory) DeleteNetworkInterface

func (f *FakeFactory) DeleteNetworkInterface(eniID string) error

func (*FakeFactory) GetAttachedNetworkInterface

func (f *FakeFactory) GetAttachedNetworkInterface(preferTrunkID string) ([]*daemon.ENI, error)

func (*FakeFactory) LoadNetworkInterface

func (f *FakeFactory) LoadNetworkInterface(mac string) ([]netip.Addr, []netip.Addr, error)

func (*FakeFactory) UnAssignNIPv4

func (f *FakeFactory) UnAssignNIPv4(eniID string, ips []netip.Addr, mac string) error

func (*FakeFactory) UnAssignNIPv6

func (f *FakeFactory) UnAssignNIPv6(eniID string, ips []netip.Addr, mac string) error

Jump to

Keyboard shortcuts

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