checkpoint

package
v0.33.0 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanupCheckpoint

func CleanupCheckpoint(path string) error

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

Jump to

Keyboard shortcuts

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