package v1

import "k8s.io/kubernetes/pkg/kubelet/checkpointmanager/testing/example_checkpoint_formats/v1"

Index

Types

type CheckpointData

type CheckpointData struct {
	Version  string
	Name     string
	Data     *Data
	Checksum checksum.Checksum
}

CheckpointData is a sample example structure to be used in test cases for checkpointing

func (*CheckpointData) MarshalCheckpoint

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

MarshalCheckpoint tries to marshal the CheckpointData into JSON data.

func (*CheckpointData) UnmarshalCheckpoint

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

UnmarshalCheckpoint tries to unmarshal the passed JSON data into CheckpointData.

func (*CheckpointData) VerifyChecksum

func (cp *CheckpointData) VerifyChecksum() error

VerifyChecksum verifies that CheckpointData's checksum is same as the checksum calculated by its data.

type Data

type Data struct {
	PortMappings []*PortMapping `json:"port_mappings,omitempty"`
	HostNetwork  bool           `json:"host_network,omitempty"`
}

Data contains all types of data that can be stored in the checkpoint.

type PortMapping

type PortMapping struct {
	// protocol of the port mapping.
	Protocol *protocol
	// Port number within the container.
	ContainerPort *int32
	// Port number on the host.
	HostPort *int32
}

PortMapping is the port mapping configurations of a sandbox.

Source Files

types.go

Version
v1.33.0 (latest)
Published
Apr 23, 2025
Platform
linux/amd64
Imports
2 packages
Last checked
3 hours ago

Tools for package owners.