internal

package
v0.0.0-...-66ead01 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2023 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var IMG_SERVICE_MAGIC uint32 = 0x55105940
View Source
var STATS_MAGIC uint32 = 0x57093306

Functions

func ComputeSha256

func ComputeSha256(reader io.Reader) string

func CreateCheckpointImage

func CreateCheckpointImage(ctx context.Context, checkpointPath string, containerName string, checkpointName string) (string, string, error)

func CreateOCIImage

func CreateOCIImage(fromPath string, containerName string, checkpointName string) error

func GenerateImageConfig

func GenerateImageConfig(diffId string) ([]byte, error)

func GenerateImageManifest

func GenerateImageManifest(imageConfigDigest string, imageConfigSize int, layerDigest string, layerSize int, containerName string) ([]byte, error)

func GenerateIndex

func GenerateIndex(imageManifestDigest string, imageManifestSize int) ([]byte, error)

func GenerateOCILayout

func GenerateOCILayout() string

func Gzip

func Gzip(reader io.Reader, target io.Writer) error

func ImportImage

func ImportImage(path string) error

func ReadStats

func ReadStats(checkpointTar string) []byte

Types

type BlobReference

type BlobReference struct {
	MediaType string `json:"mediaType"`
	Digest    string `json:"digest"`
	Size      int    `json:"size"`
}

type Config

type Config struct {
}

type HistoryEntry

type HistoryEntry struct {
	Created   time.Time `json:"created"`
	CreatedBy string    `json:"created_by"`
}

type ImageConfig

type ImageConfig struct {
	Created      time.Time      `json:"created"`
	Architecture string         `json:"architecture"`
	Variant      string         `json:"variant"`
	Os           string         `json:"os"`
	Config       Config         `json:"config"`
	RootFs       RootFs         `json:"rootfs"`
	History      []HistoryEntry `json:"history"`
}

type ImageManifest

type ImageManifest struct {
	SchemaVersion int               `json:"schemaVersion"`
	MediaType     string            `json:"mediaType"`
	Config        BlobReference     `json:"config"`
	Layers        []BlobReference   `json:"layers"`
	Annotations   map[string]string `json:"annotations"`
}

type Index

type Index struct {
	SchemaVersion int             `json:"schemaVersion"`
	Manifests     []BlobReference `json:"manifests"`
}

type RootFs

type RootFs struct {
	Type    string   `json:"type"`
	DiffIds []string `json:"diff_ids"`
}

Jump to

Keyboard shortcuts

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