store

package
v0.3.4 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	PersistenceDirectory string
}

type Store

type Store struct {

	// sort of global config
	GlobalHints struct {
		HttpPort int
	}
	// contains filtered or unexported fields
}

func NewStore

func NewStore(cfg Config) (*Store, error)

func (*Store) Find

func (s *Store) Find(id string) *manifest.Manifest

func (*Store) FindByIP

func (s *Store) FindByIP(ip net.IP) *manifest.Manifest

func (*Store) FindByMAC

func (s *Store) FindByMAC(mac net.HardwareAddr) *manifest.Manifest

func (*Store) ForgetManifest

func (s *Store) ForgetManifest(id string) error

func (*Store) GetAll

func (s *Store) GetAll() map[string]*manifest.Manifest

func (*Store) LoadFromDirectory

func (s *Store) LoadFromDirectory(path string) (err error)

func (*Store) PutManifest

func (s *Store) PutManifest(m manifest.Manifest) error

Jump to

Keyboard shortcuts

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