Documentation
¶
Index ¶
- type KeyValueStore
- func (kv *KeyValueStore) Get(key string) (interface{}, bool)
- func (kv *KeyValueStore) LoadFromFile(filepath string) error
- func (kv *KeyValueStore) Put(key string, value interface{})
- func (kv *KeyValueStore) Save(w io.Writer) error
- func (kv *KeyValueStore) Store(key string, value interface{}, filepath string)
- func (kv *KeyValueStore) Watch(filepath string)
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) 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)
Click to show internal directories.
Click to hide internal directories.