Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitCheckStateManager ¶
func InitCheckStateManager()
InitCheckStateManager initialized the default implementation of the CheckStateAPI
Types ¶
type CheckStateAPI ¶
type CheckStateAPI interface { GetState(key string) (string, error) SetState(key, value string) error Clear() }
CheckStateAPI contains all the functions for setting and getting state from disk / memory
func GetCheckStateManager ¶
func GetCheckStateManager() CheckStateAPI
GetCheckStateManager returns a handle on the global check checkmanager Instance
type CheckStateManager ¶
type CheckStateManager struct { Config Config Cache *cache.Cache }
CheckStateManager is the default implementation for the CheckStateAPI that read / writes state from / to disk
func NewCheckStateManager ¶
func NewCheckStateManager() *CheckStateManager
NewCheckStateManager returns a pointer to an instance of CheckStateManager which implements the CheckStateAPI
func (*CheckStateManager) Clear ¶
func (cs *CheckStateManager) Clear()
Clear removes all the elements in the CheckStateManager Cache
func (*CheckStateManager) GetState ¶
func (cs *CheckStateManager) GetState(key string) (string, error)
GetState returns a value previously stored, or an error that occurred when trying to retrieve the state for a given key
func (*CheckStateManager) SetState ¶
func (cs *CheckStateManager) SetState(key, value string) error
SetState stores data on disk in the config.StateRootPath directory