contextstore

package
v1.0.16 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2017 License: GPL-2.0 Imports: 5 Imported by: 0

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() 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

Directories

Path Synopsis
nolint
nolint

Jump to

Keyboard shortcuts

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