package convertor

import "github.com/containerd/accelerated-container-image/pkg/convertor"

Index

Functions

func IndexConvertFunc

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

Types

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) (ImageConvertor, error)

type Option

type Option func(o *options) error

func WithAlgorithm

func WithAlgorithm(algorithm string) Option

func WithBlockSize

func WithBlockSize(blockSize int) Option

func WithClient

func WithClient(client *containerd.Client) Option

func WithDbstr

func WithDbstr(dbstr string) Option

func WithFsType

func WithFsType(fsType string) Option

func WithImageRef

func WithImageRef(imgRef string) Option

func WithResolver

func WithResolver(resolver remotes.Resolver) Option

type OverlaybdLayer

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

type ZFileConfig

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

Source Files

convertor.go

Version
v0.6.0
Published
Jan 20, 2023
Platform
js/wasm
Imports
31 packages
Last checked
1 minute ago

Tools for package owners.