storage

package
v0.13.5 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrImageHasChildren = errors.New("image has children")

ErrImageHasChildren is returned if image being deleted has children

Functions

This section is empty.

Types

type Driver

type Driver interface {
	// Builds returns available builds
	Builds(ctx context.Context) ([]types.BuildID, error)

	// Info returns information about build
	Info(ctx context.Context, buildID types.BuildID) (types.BuildInfo, error)

	// BuildID returns build ID for build given by name and tag
	BuildID(ctx context.Context, buildKey types.BuildKey) (types.BuildID, error)

	// CreateEmpty creates blank build
	CreateEmpty(ctx context.Context, imageName string, buildID types.BuildID) (FinalizeFn, string, error)

	// Clone clones build to destination build
	Clone(ctx context.Context, srcBuildID types.BuildID, dstImageName string, dstBuildID types.BuildID) (FinalizeFn, string, error)

	// StoreManifest stores manifest of build
	StoreManifest(ctx context.Context, manifest types.ImageManifest) error

	// Tag tags build with tag
	Tag(ctx context.Context, buildID types.BuildID, tag types.Tag) error

	// Untag removes tag from the build
	Untag(ctx context.Context, buildID types.BuildID, tag types.Tag) error

	// Drop drops build
	Drop(ctx context.Context, buildID types.BuildID) error
}

Driver represents storage driver

func NewZFSDriver

func NewZFSDriver(config config.Storage) Driver

NewZFSDriver returns new storage driver based on zfs datasets

func Resolve

func Resolve(c *ioc.Container, config config.Storage) Driver

Resolve resolves concrete storage driver based on config

type FinalizeFn

type FinalizeFn = func() error

FinalizeFn unmounts mounted image

Jump to

Keyboard shortcuts

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