Documentation ¶
Overview ¶
Data store functionality. For now, we're just keeping in memory, but optional use of a persistent storage backend eventually is on the list of things to do down the road. Using go-cache (https://github.com/pmylund/go-cache) for storing our data - might be worth using for normal caching later as well.
Index ¶
- func WalkMapForNil(r interface{}) interface{}
- type DataStore
- func (ds *DataStore) Delete(key_type string, key string)
- func (ds *DataStore) Get(key_type string, key string) (interface{}, bool)
- func (ds *DataStore) GetList(key_type string) []string
- func (ds *DataStore) Load(dsFile string) error
- func (ds *DataStore) Save(dsFile string) error
- func (ds *DataStore) Set(key_type string, key string, val interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WalkMapForNil ¶ added in v0.3.0
func WalkMapForNil(r interface{}) interface{}
Walk through the given map, searching for nil slices to create. This does not handle all possible cases, but it *does* handle the cases found with the chef objects in goiardi.
Types ¶
type DataStore ¶
type DataStore struct {
// contains filtered or unexported fields
}
Main data store
Click to show internal directories.
Click to hide internal directories.