kubernetesk8s.io/kubernetes/pkg/kubelet/checkpoint Index | Files

package checkpoint

import "k8s.io/kubernetes/pkg/kubelet/checkpoint"

Index

Functions

func DeletePod

func DeletePod(cpm checkpointmanager.CheckpointManager, pod *v1.Pod) error

DeletePod deletes a checkpoint from disk if present

func LoadPods

func LoadPods(cpm checkpointmanager.CheckpointManager) ([]*v1.Pod, error)

LoadPods Loads All Checkpoints from disk

func WritePod

func WritePod(cpm checkpointmanager.CheckpointManager, pod *v1.Pod) error

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

Types

type Data

type Data struct {
	Pod      *v1.Pod
	Checksum checksum.Checksum
}

Data to be stored as checkpoint

func (*Data) GetPod

func (cp *Data) GetPod() *v1.Pod

func (*Data) MarshalCheckpoint

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

MarshalCheckpoint returns marshalled 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 PodCheckpoint

type PodCheckpoint interface {
	checkpointmanager.Checkpoint
	GetPod() *v1.Pod
}

func NewPodCheckpoint

func NewPodCheckpoint(pod *v1.Pod) PodCheckpoint

NewPodCheckpoint returns new pod checkpoint

Source Files

checkpoint.go

Version
v1.13.9
Published
Aug 1, 2019
Platform
js/wasm
Imports
7 packages
Last checked
8 seconds ago

Tools for package owners.