dhcp_store

package
v0.0.0-...-6af2dc9 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DhcpStore

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

func (*DhcpStore) GetNode

func (d *DhcpStore) GetNode(node string) (net.IP, bool)

func (*DhcpStore) Merge

func (d *DhcpStore) Merge(items []cache.CacheItem)

func (*DhcpStore) NewIp

func (d *DhcpStore) NewIp(node string) net.IP

func (*DhcpStore) Serialize

func (d *DhcpStore) Serialize() []cache.CacheItem

func (*DhcpStore) StoreIp

func (d *DhcpStore) StoreIp(ip net.IP, node string)

type MockDhcpStore

type MockDhcpStore struct {
	NewIpFunc     func(node string) net.IP
	StoreIpFunc   func(ip net.IP, node string)
	GetNodeFunc   func(node string) (net.IP, bool)
	SerializeFunc func() []cache.CacheItem
	MergeFunc     func(items []cache.CacheItem)
}

func (MockDhcpStore) GetNode

func (d MockDhcpStore) GetNode(node string) (net.IP, bool)

func (MockDhcpStore) Merge

func (d MockDhcpStore) Merge(items []cache.CacheItem)

func (MockDhcpStore) NewIp

func (d MockDhcpStore) NewIp(node string) net.IP

func (MockDhcpStore) Serialize

func (d MockDhcpStore) Serialize() []cache.CacheItem

func (MockDhcpStore) StoreIp

func (d MockDhcpStore) StoreIp(ip net.IP, node string)

type Store

type Store interface {
	NewIp(node string) net.IP
	StoreIp(ip net.IP, node string)
	GetNode(node string) (net.IP, bool)
	Serialize() []cache.CacheItem
	Merge(items []cache.CacheItem)
}

func New

func New() Store

Jump to

Keyboard shortcuts

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