checkpoint

package
v1.1.5 Latest Latest
Warning

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

Go to latest
Published: May 10, 2021 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 8 more Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrKeyNotFound is the error returned if key is not found in Store.
	ErrKeyNotFound = fmt.Errorf("key is not found")
)

Functions

This section is empty.

Types

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

CheckpointManager stores checkpoint in file.

func NewManager

func NewManager(path string, file string) (*Manager, error)

NewManager returns an instance of CheckpointManager.

func (*Manager) Delete

func (f *Manager) Delete() error

Delete deletes the file.

func (*Manager) Read

func (f *Manager) Read() ([]byte, error)

Read reads the checkpoint from the file.

func (*Manager) Write

func (f *Manager) Write(data []byte) error

Write writes the given checkpoint to file.

Jump to

Keyboard shortcuts

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