package testing

import "github.com/containernetworking/plugins/plugins/ipam/host-local/backend/testing"

Index

Types

type FakeStore

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

func NewFakeStore

func NewFakeStore(ipmap map[string]string, lastIPs map[string]net.IP) *FakeStore

func (*FakeStore) Close

func (s *FakeStore) Close() error

func (*FakeStore) GetByID

func (s *FakeStore) GetByID(id string, _ string) []net.IP

func (*FakeStore) LastReservedIP

func (s *FakeStore) LastReservedIP(rangeID string) (net.IP, error)

func (*FakeStore) Lock

func (s *FakeStore) Lock() error

func (*FakeStore) ReleaseByID

func (s *FakeStore) ReleaseByID(id string, _ string) error

func (*FakeStore) Reserve

func (s *FakeStore) Reserve(id string, _ string, ip net.IP, rangeID string) (bool, error)

func (*FakeStore) SetIPMap

func (s *FakeStore) SetIPMap(m map[string]string)

func (*FakeStore) Unlock

func (s *FakeStore) Unlock() error

Source Files

fake_store.go

Version
v1.7.1 (latest)
Published
Apr 25, 2025
Platform
linux/amd64
Imports
3 packages
Last checked
1 day ago

Tools for package owners.