convertor

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: Apache-2.0 Imports: 36 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ConvContentNameFormat = convSnapshotNameFormat
)

Functions

func IndexConvertFunc added in v0.5.2

func IndexConvertFunc(opts ...Option) converter.ConvertFunc

func NewContentLoaderWithFsType added in v0.6.1

func NewContentLoaderWithFsType(isAccelLayer bool, fsType string, files ...ContentFile) *contentLoader

contentLoader can load multiple files into content.Store service, and return an oci.v1.tar layer.

Types

type ContentFile added in v0.6.1

type ContentFile struct {
	SrcFilePath string // .../{ID}/fs/overlaybd.sealed
	DstFileName string // overlaybd.commit
}

type ImageConvertor

type ImageConvertor interface {
	Convert(ctx context.Context, srcManifest ocispec.Manifest, fsType string) (ocispec.Descriptor, error)
}

func NewOverlaybdConvertor

func NewOverlaybdConvertor(ctx context.Context, cs content.Store, sn snapshots.Snapshotter, resolver remotes.Resolver, ref string, dbstr string, zfileCfg ZFileConfig, vsize int) (ImageConvertor, error)

type Layer added in v0.6.1

type Layer struct {
	Desc   ocispec.Descriptor
	DiffID digest.Digest
}

func (*Layer) GetInfo added in v0.6.1

func (l *Layer) GetInfo() (ocispec.Descriptor, digest.Digest)

type Option added in v0.5.2

type Option func(o *options) error

func WithAlgorithm added in v0.6.0

func WithAlgorithm(algorithm string) Option

func WithBlockSize added in v0.6.0

func WithBlockSize(blockSize int) Option

func WithClient added in v0.5.2

func WithClient(client *containerd.Client) Option

func WithDbstr added in v0.5.2

func WithDbstr(dbstr string) Option

func WithFsType added in v0.5.2

func WithFsType(fsType string) Option

func WithImageRef added in v0.5.2

func WithImageRef(imgRef string) Option

func WithResolver added in v0.5.2

func WithResolver(resolver remotes.Resolver) Option

func WithVsize added in v1.0.3

func WithVsize(vsize int) Option

type OverlaybdLayer

type OverlaybdLayer struct {
	Host       string
	Repo       string
	ChainID    string
	DataDigest string
	DataSize   int64
}

type ZFileConfig added in v0.6.0

type ZFileConfig struct {
	Algorithm string `json:"algorithm"`
	BlockSize int    `json:"blockSize"`
}

Jump to

Keyboard shortcuts

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