mock

package
v1.11.0-cni-plu...-aa3fb74 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: Apache-2.0, Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DummyMap

type DummyMap struct{}

func (*DummyMap) Close

func (*DummyMap) Close() error

func (*DummyMap) CopyDeltaFromOldMap

func (*DummyMap) CopyDeltaFromOldMap() error

func (*DummyMap) Delete

func (*DummyMap) Delete(k []byte) error

func (*DummyMap) EnsureExists

func (*DummyMap) EnsureExists() error

func (*DummyMap) ErrIsNotExists

func (*DummyMap) ErrIsNotExists(err error) bool

func (*DummyMap) Get

func (*DummyMap) Get(k []byte) ([]byte, error)

func (*DummyMap) GetName

func (*DummyMap) GetName() string

func (*DummyMap) Iter

func (*DummyMap) Iter(_ maps.IterCallback) error

func (*DummyMap) MapFD

func (*DummyMap) MapFD() maps.FD

func (*DummyMap) Open

func (*DummyMap) Open() error

func (*DummyMap) Path

func (*DummyMap) Path() string

func (*DummyMap) Update

func (*DummyMap) Update(k, v []byte) error

type Map

type Map struct {
	sync.Mutex
	maps.MapParameters

	Contents map[string]string

	UpdateCount int
	GetCount    int
	DeleteCount int
	IterCount   int

	IterErr   error
	UpdateErr error
	DeleteErr error
	// contains filtered or unexported fields
}

func NewMockMap

func NewMockMap(params maps.MapParameters) *Map

func (*Map) Close

func (m *Map) Close() error

func (*Map) ContainsKV

func (m *Map) ContainsKV(k, v []byte) bool

func (*Map) ContainsKey

func (m *Map) ContainsKey(k []byte) bool

func (*Map) CopyDeltaFromOldMap

func (m *Map) CopyDeltaFromOldMap() error

func (*Map) Delete

func (m *Map) Delete(k []byte) error

func (*Map) DeleteIfExists

func (m *Map) DeleteIfExists(k []byte) error

func (*Map) EnsureExists

func (m *Map) EnsureExists() error

func (*Map) ErrIsNotExists

func (*Map) ErrIsNotExists(err error) bool

func (*Map) Get

func (m *Map) Get(k []byte) ([]byte, error)

func (*Map) GetName

func (m *Map) GetName() string

func (*Map) IsEmpty

func (m *Map) IsEmpty() bool

func (*Map) Iter

func (m *Map) Iter(f maps.IterCallback) error

func (*Map) MapFD

func (m *Map) MapFD() maps.FD

func (*Map) OpCount

func (m *Map) OpCount() int

func (*Map) Open

func (m *Map) Open() error

func (*Map) Path

func (m *Map) Path() string

func (*Map) Update

func (m *Map) Update(k, v []byte) error

func (*Map) UpdateWithFlags

func (m *Map) UpdateWithFlags(k, v []byte, flags int) error

Directories

Path Synopsis
v2
v3
v4
v5

Jump to

Keyboard shortcuts

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