Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContextStore ¶
type ContextStore interface { // StoreContext stores a contextID and eventInfo in the store StoreContext(contextID string, eventInfo interface{}) error // DestroyStore destroys the store DestroyStore() error // GetContextInfo retrieves the context given a context ID GetContextInfo(contextID string) (interface{}, error) // RemoveContext removes the context given a context ID RemoveContext(contextID string) error // WalkStore walks the whole store and returns a channel for the values WalkStore() (chan string, error) }
ContextStore is the interface defining the context store
func NewContextStore ¶
func NewContextStore(basePath string) ContextStore
NewContextStore returns a handle to a new context store The store is maintained in a file hierarchy so if the context id already exists calling a storecontext with new id will cause an overwrite
func NewCustomContextStore ¶
func NewCustomContextStore(basePath string) ContextStore
NewCustomContextStore will start a context store with custom paths. Mainly used for testing when root access is not available and /var/run cannot be accessed
Click to show internal directories.
Click to hide internal directories.