utils

package
v0.0.0-...-2440f66 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2023 License: Apache-2.0 Imports: 14 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"
	LayerAnnotationUncompressed         = "containerd.io/uncompressed"
)
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

type ExcludeNydusPlatformComparer

type ExcludeNydusPlatformComparer struct {
	platforms.MatchComparer
}

func (ExcludeNydusPlatformComparer) Less

func (ExcludeNydusPlatformComparer) Match

type NydusPlatformComparer

type NydusPlatformComparer struct {
	platforms.MatchComparer
}

func (NydusPlatformComparer) Less

func (NydusPlatformComparer) Match

func (c NydusPlatformComparer) Match(platform ocispec.Platform) bool

Jump to

Keyboard shortcuts

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