Documentation
¶
Index ¶
Constants ¶
View Source
const (
CtrdSockEnv = "CONTAINERD_SOCK"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Directory ¶
type Directory struct {
// contains filtered or unexported fields
}
func NewDirectoryUnpacker ¶
func NewDirectoryUnpacker(s *sys.System, path string, opts ...DirectoryOpt) *Directory
func (Directory) SynchedUnpack ¶
type DirectoryOpt ¶
type DirectoryOpt func(*Directory)
func WithRsyncFlagsDir ¶
func WithRsyncFlagsDir(flags ...string) DirectoryOpt
type Interface ¶
type Interface interface {
// Unpack extracts the contents to the provided destination. It allows to exclude
// certain given paths. All exclude paths are assumed to be tied to source root
Unpack(ctx context.Context, destination string, excludes ...string) (string, error)
// SynchedUnpack extracts the contents to the provided destination ensuring origin and
// destination are perfectly synched, that is any preexisting content in destination which
// is not part of the original image source will be deleted. In addition, it allows to exclude
// paths from the synchronization.
SynchedUnpack(ctx context.Context, destination string, excludes []string, deleteExcludes []string) (string, error)
}
func NewUnpacker ¶
func NewUnpacker(s *sys.System, src *deployment.ImageSource, opts ...Opt) (Interface, error)
type OCIOpt ¶
type OCIOpt func(*OCI)
func WithContainerd ¶
func WithContainerd(ctrd containerd.Interface) OCIOpt
func WithLocalOCI ¶
func WithPlatformRefOCI ¶
func WithRsyncFlagsOCI ¶
func WithVerifyOCI ¶
type Opt ¶
type Opt func(deployment.ImageSrcType, *options)
func WithPlatformRef ¶
func WithRsyncFlags ¶
func WithVerify ¶
type Tar ¶
type Tar struct {
// contains filtered or unexported fields
}
func (Tar) SynchedUnpack ¶
func (t Tar) SynchedUnpack(ctx context.Context, destination string, excludes []string, deleteExcludes []string) (digest string, err error)
SynchedUnpack for tarball files will extract tar contents to a destination sibling directory first and after that it will sync it to the destination directory. Ideally the destination path should not be mountpoint to a different filesystem of the sibling directories in order to benefit of copy on write features of the base filesystem.
Click to show internal directories.
Click to hide internal directories.