kvs

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2026 License: MIT Imports: 12 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KeyValueStore

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

func NewKeyValueStore

func NewKeyValueStore(name string, f func(string) (interface{}, error)) *KeyValueStore

func (*KeyValueStore) Get

func (kv *KeyValueStore) Get(key string) (interface{}, bool)

func (*KeyValueStore) LoadFromFile

func (kv *KeyValueStore) LoadFromFile(filepath string) error

func (*KeyValueStore) Put

func (kv *KeyValueStore) Put(key string, value interface{})

func (*KeyValueStore) Save

func (kv *KeyValueStore) Save(w io.Writer) error

func (*KeyValueStore) Store

func (kv *KeyValueStore) Store(key string, value interface{}, filepath string)

func (*KeyValueStore) Watch

func (kv *KeyValueStore) Watch(filepath string)

NOTE: interim file watcher implementation pending fsnotify in Go 1.4

(https://github.com/fsnotify/fsnotify requires workarounds for
 files updated atomically by renaming)

Jump to

Keyboard shortcuts

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