checkpoint

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2021 License: Apache-2.0, BSD-3-Clause, MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NodeResourceCheckPoint

type NodeResourceCheckPoint struct {
	Timeseconds     int64
	ScheduleDisable bool
	Checksum        checksum.Checksum
}

NodeResourceCheckPoint struct is used to store schedule state in a checkpoint

func NewNodeResourceCheckPoint

func NewNodeResourceCheckPoint() *NodeResourceCheckPoint

NewNodeResourceCheckPoint returns an instance of CheckPoint

func (*NodeResourceCheckPoint) MarshalCheckpoint

func (r *NodeResourceCheckPoint) MarshalCheckpoint() ([]byte, error)

MarshalCheckpoint returns marshalled checkpoing

func (*NodeResourceCheckPoint) UnmarshalCheckpoint

func (r *NodeResourceCheckPoint) UnmarshalCheckpoint(blob []byte) error

UnmarshalCheckpoint tries to unmarshal passed types to checkpoing

func (*NodeResourceCheckPoint) VerifyChecksum

func (r *NodeResourceCheckPoint) VerifyChecksum() error

VerifyChecksum verifies that current checksum of checkpoint is valid

type NodeResourceCheckpointManager

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

NodeResourceCheckpointManager struct is used to manage checkpoint

func NewNodeResourceCheckpointManager

func NewNodeResourceCheckpointManager(checkpointDir, checkpointName string) (*NodeResourceCheckpointManager, error)

NewNodeResourceCheckpointManager returns an instance of CheckPointManager

func (*NodeResourceCheckpointManager) RestoreNodeResourceCheckpoint

func (r *NodeResourceCheckpointManager) RestoreNodeResourceCheckpoint() (*NodeResourceCheckPoint, error)

RestoreNodeResourceCheckpoint restore checkpoint

func (*NodeResourceCheckpointManager) StoreNodeResourceCheckpoint

func (r *NodeResourceCheckpointManager) StoreNodeResourceCheckpoint(checkpoint *NodeResourceCheckPoint) error

StoreNodeResourceCheckpoint store checkpoint

Jump to

Keyboard shortcuts

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