checkpoint

package
v0.5.13 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2024 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteSPD

DeleteSPD deletes a checkpoint from disk if present

func LoadSPDs

func LoadSPDs(cpm checkpointmanager.CheckpointManager, skipCorruptionError bool) ([]*v1alpha1.ServiceProfileDescriptor, error)

LoadSPDs Loads All Checkpoints from disk

func WriteSPD

WriteSPD a checkpoint to a file on disk if annotation is present

Types

type Data

type Data struct {
	SPD      *v1alpha1.ServiceProfileDescriptor
	Checksum checksum.Checksum
}

Data to be stored as checkpoint

func (*Data) GetSPD

func (cp *Data) GetSPD() *v1alpha1.ServiceProfileDescriptor

GetSPD retrieves the spd from the checkpoint

func (*Data) MarshalCheckpoint

func (cp *Data) MarshalCheckpoint() ([]byte, error)

MarshalCheckpoint returns marshaled data

func (*Data) UnmarshalCheckpoint

func (cp *Data) UnmarshalCheckpoint(blob []byte) error

UnmarshalCheckpoint returns unmarshalled data

func (*Data) VerifyChecksum

func (cp *Data) VerifyChecksum() error

VerifyChecksum verifies that passed checksum is same as calculated checksum

type ServiceProfileCheckpoint

type ServiceProfileCheckpoint interface {
	checkpointmanager.Checkpoint
	GetSPD() *v1alpha1.ServiceProfileDescriptor
}

ServiceProfileCheckpoint defines the operations to retrieve spd

func NewServiceProfileCheckpoint

func NewServiceProfileCheckpoint(spd *v1alpha1.ServiceProfileDescriptor) ServiceProfileCheckpoint

NewServiceProfileCheckpoint returns new spd checkpoint

Jump to

Keyboard shortcuts

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