utils

package
v0.2.13 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ManifestOSFeatureNydus   = "nydus.remoteimage.v1"
	MediaTypeNydusBlob       = "application/vnd.oci.image.layer.nydus.blob.v1"
	BootstrapFileNameInLayer = "image/image.boot"

	LayerAnnotationNydusBlob            = "containerd.io/snapshot/nydus-blob"
	LayerAnnotationNydusBootstrap       = "containerd.io/snapshot/nydus-bootstrap"
	LayerAnnotationNydusRAFSVersion     = "containerd.io/snapshot/nydus-rafs-version"
	LayerAnnotationNydusBlobIDs         = "containerd.io/snapshot/nydus-blob-ids"
	LayerAnnotationNydusBootstrapDigest = "containerd.io/snapshot/nydus-bootstrap-digest"
	LayerAnnotationNydusFsVersion       = "containerd.io/snapshot/nydus-fs-version"
)
View Source
const ChunkInfoOffset = 1024 + 128 + 24
View Source
const MaxSuperBlockSize = 8192
View Source
const RafsV6Magic = 0xE0F5E1E2
View Source
const RafsV6SuppeOffset = 1024

Variables

Functions

func GetRawBootstrapFromV6

func GetRawBootstrapFromV6(file io.ReadSeeker) (io.Reader, error)

func IsNydusManifest

func IsNydusManifest(manifest *ocispec.Manifest) bool

func IsNydusPlatform

func IsNydusPlatform(platform *ocispec.Platform) bool

func MarshalToDesc

func MarshalToDesc(data interface{}, mediaType string) (*ocispec.Descriptor, []byte, error)

func PackTargz

func PackTargz(src string, name string, compress bool) (io.ReadCloser, error)

PackTargz makes .tar(.gz) stream of file named `name` and returns reader

func PackTargzInfo

func PackTargzInfo(src, name string, compress bool) (digest.Digest, int64, error)

PackTargzInfo makes .tar(.gz) stream of file named `name` and return digest and size

func UnpackFile

func UnpackFile(reader io.Reader, source, target string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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