Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewSimpleCheckpointManager ¶
func NewSimpleCheckpointManager(path string) *simpleCheckpointManager
Provides checkpoint manager that uses key to store checkpoints within provided directory. The manager uses std json package to encode/decode the stucts. This is thread-safe per key which is usual usage.
Types ¶
type CheckpointManager ¶
type CheckpointManager interface { // Retrieves checkpoint for given key. The value needs to be pointer to struct. // os.ErrNotExist is returned if there is no checkpoint for given key. Get(key string, value interface{}) error // Stores checkpoint for given key. The value needs to be pointer to struct. Store(key string, value interface{}) error // os.ErrNotExist is returned if there is no checkpoint for given key. Delete(key string) error }
Warning: The interface doesn't require thread-safe behaviour
Click to show internal directories.
Click to hide internal directories.