Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CleanupCheckpoint ¶
func GetCheckpointData ¶
func GetCheckpointData[T any](cm *CheckpointManager, key string) (T, bool, error)
GetCheckpointData retrieves the checkpoint data for a given key and unmarshals it into the provided type
Types ¶
type CheckpointManager ¶
type CheckpointManager struct {
// contains filtered or unexported fields
}
CheckpointManager manages the checkpoints for different types of data
func NewCheckpointManager ¶
func NewCheckpointManager(checkpointLocation string) *CheckpointManager
NewCheckpointManager creates a new CheckpointManager
func (*CheckpointManager) GetCheckpoint ¶
func (cm *CheckpointManager) GetCheckpoint(key string) (any, bool)
GetCheckpoint gets the checkpoint for a given key
func (*CheckpointManager) LoadCheckpoint ¶
func (cm *CheckpointManager) LoadCheckpoint() error
LoadCheckpoint loads the checkpoint data from a file
func (*CheckpointManager) SaveCheckpoint ¶
func (cm *CheckpointManager) SaveCheckpoint(key string, value any) error
SaveCheckpoint saves a checkpoint for a given key
Click to show internal directories.
Click to hide internal directories.