internal

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2026 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Format             string
	Stats              bool
	Mounts             bool
	OutputFilePath     string
	PID                uint32
	PsTree             bool
	PsTreeCmd          bool
	PsTreeEnv          bool
	Files              bool
	Sockets            bool
	ShowAll            bool
	SearchPattern      string
	SearchRegexPattern string
	SearchContext      int
	Metadata           bool
)

Functions

func CleanupTasks

func CleanupTasks(tasks []Task)

cleanupTasks removes all output directories of given tasks

func FormatTime

func FormatTime(microseconds uint32) string

func GetNewTabWriter added in v1.4.0

func GetNewTabWriter(output io.Writer) *tabwriter.Writer

GetNewTabWriter returns a tabwriter that translates tabbed columns in input into properly aligned text.

func RenderJSONView

func RenderJSONView(tasks []Task) error

func RenderTreeView

func RenderTreeView(tasks []Task) error

func ShowContainerCheckpoints

func ShowContainerCheckpoints(tasks []Task) error

func UntarFiles

func UntarFiles(src, dest string, files []string) error

UntarFiles unpack only specified files from an archive to the destination directory.

func WriteTableHeader added in v1.4.0

func WriteTableHeader(w *tabwriter.Writer, header []string)

WriteTableHeader writes the header row and separator line for a table

func WriteTableRows added in v1.4.0

func WriteTableRows(w *tabwriter.Writer, rows [][]string)

WriteTableRows writes the data rows for a table

Types

type CheckpointSize

type CheckpointSize struct {
	TotalSize             int64 `json:"total_size,omitempty"`
	MemoryPagesSize       int64 `json:"memory_pages_size,omitempty"`
	AmdGpuMemoryPagesSize int64 `json:"amd_gpu_memory_pages_size,omitempty"`
	RootFsDiffSize        int64 `json:"root_fs_diff_size,omitempty"`
}

type ChkptConfig

type ChkptConfig struct {
	Namespace        string
	Pod              string
	Container        string
	ContainerManager string
	Timestamp        time.Time
}

func ExtractConfigDump

func ExtractConfigDump(checkpointPath string) (*ChkptConfig, error)

type DisplayNode

type DisplayNode struct {
	ContainerName      string         `json:"container_name"`
	Image              string         `json:"image"`
	ID                 string         `json:"id"`
	Runtime            string         `json:"runtime"`
	Created            string         `json:"created"`
	Checkpointed       string         `json:"checkpointed,omitempty"`
	Engine             string         `json:"engine"`
	IP                 string         `json:"ip,omitempty"`
	MAC                string         `json:"mac,omitempty"`
	CheckpointSize     CheckpointSize `json:"checkpoint_size"`
	CriuDumpStatistics *StatsNode     `json:"statistics,omitempty"`
	ProcessTree        *PsNode        `json:"process_tree,omitempty"`
	FileDescriptors    []FdNode       `json:"file_descriptors,omitempty"`
	Sockets            []SkNode       `json:"sockets,omitempty"`
	Mounts             []MountNode    `json:"mounts,omitempty"`
}

type FdNode

type FdNode struct {
	PID       uint32         `json:"pid"`
	OpenFiles []OpenFileNode `json:"open_files,omitempty"`
}

type ImageBuilder added in v1.4.0

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

func NewImageBuilder added in v1.4.0

func NewImageBuilder(imageName, checkpointPath string) *ImageBuilder

func (*ImageBuilder) CreateImageFromCheckpoint added in v1.4.0

func (ic *ImageBuilder) CreateImageFromCheckpoint(ctx context.Context) error

type MountNode

type MountNode struct {
	Destination string `json:"destination"`
	Type        string `json:"type"`
	Source      string `json:"source"`
}

type OpenFileNode

type OpenFileNode struct {
	Type string `json:"type"`
	FD   string `json:"fd"`
	Path string `json:"path"`
}

type PsNode

type PsNode struct {
	PID       uint32            `json:"pid"`
	Comm      string            `json:"command"`
	Cmdline   string            `json:"cmdline,omitempty"`
	TaskState string            `json:"task_state,omitempty"`
	EnvVars   map[string]string `json:"environment_variables,omitempty"`
	Children  []PsNode          `json:"children,omitempty"`
}

type SkData

type SkData struct {
	Type       string `json:"type,omitempty"`
	Address    string `json:"address,omitempty"`
	State      string `json:"state,omitempty"`
	Source     string `json:"src,omitempty"`
	SourcePort uint32 `json:"src_port,omitempty"`
	Dest       string `json:"dst,omitempty"`
	DestPort   uint32 `json:"dst_port,omitempty"`
	SendBuf    string `json:"send_buf,omitempty"`
	RecvBuf    string `json:"recv_buf,omitempty"`
}

type SkNode

type SkNode struct {
	PID         uint32       `json:"pid"`
	OpenSockets []SocketNode `json:"open_sockets,omitempty"`
}

type SocketNode

type SocketNode struct {
	Protocol string `json:"protocol,omitempty"`
	Data     SkData `json:"data,omitempty"`
}

type StatsNode

type StatsNode struct {
	FreezingTime uint32 `json:"freezing_time,omitempty"`
	FrozenTime   uint32 `json:"frozen_time,omitempty"`
	MemdumpTime  uint32 `json:"memdump_time,omitempty"`
	MemwriteTime uint32 `json:"memwrite_time,omitempty"`
	PagesScanned uint64 `json:"pages_scanned,omitempty"`
	PagesWritten uint64 `json:"pages_written,omitempty"`
}

type Task

type Task struct {
	CheckpointFilePath string
	OutputDir          string
}

func CreateTasks

func CreateTasks(args []string, requiredFiles []string) ([]Task, error)

Jump to

Keyboard shortcuts

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