docker

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2025 License: MIT Imports: 45 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// DefaultImageTTL is the default time to live for images in the Docker runtime
	// after which they are pruned if not used.
	DefaultImageTTL = time.Hour * 72 // 3 days
)

defaultWorkdir is the directory where `Task.File`s are written to by default, should `Task.Workdir` not be set

Variables

This section is empty.

Functions

func NewTempArchive

func NewTempArchive() (*archive, error)

Types

type BindConfig

type BindConfig struct {
	Allowed bool
	Sources []string
}

type BindMounter

type BindMounter struct {
	// contains filtered or unexported fields
}

func NewBindMounter

func NewBindMounter(cfg BindConfig) *BindMounter

func (*BindMounter) Mount

func (m *BindMounter) Mount(ctx context.Context, mnt *tork.Mount) error

func (*BindMounter) Unmount

func (m *BindMounter) Unmount(ctx context.Context, mnt *tork.Mount) error

type DockerRuntime

type DockerRuntime struct {
	// contains filtered or unexported fields
}

func NewDockerRuntime

func NewDockerRuntime(opts ...Option) (*DockerRuntime, error)

func (*DockerRuntime) HealthCheck

func (rt *DockerRuntime) HealthCheck(ctx context.Context) error

func (*DockerRuntime) Run

func (rt *DockerRuntime) Run(ctx context.Context, t *tork.Task) error

type KubernetesConfig

type KubernetesConfig struct {
	AllNamespaces string `json:"allNamespaces,omitempty"`
}

KubernetesConfig contains Kubernetes orchestrator settings

type Option

type Option = func(rt *DockerRuntime)

func WithBroker

func WithBroker(broker broker.Broker) Option

func WithConfig

func WithConfig(config string) Option

func WithImageTTL

func WithImageTTL(ttl time.Duration) Option

func WithImageVerify

func WithImageVerify(verify bool) Option

func WithMounter

func WithMounter(mounter runtime.Mounter) Option

func WithPrivileged

func WithPrivileged(privileged bool) Option

type TmpfsMounter

type TmpfsMounter struct {
}

func NewTmpfsMounter

func NewTmpfsMounter() *TmpfsMounter

func (*TmpfsMounter) Mount

func (m *TmpfsMounter) Mount(ctx context.Context, mnt *tork.Mount) error

func (*TmpfsMounter) Unmount

func (m *TmpfsMounter) Unmount(ctx context.Context, mnt *tork.Mount) error

type VolumeMounter

type VolumeMounter struct {
	// contains filtered or unexported fields
}

func NewVolumeMounter

func NewVolumeMounter() (*VolumeMounter, error)

func (*VolumeMounter) Mount

func (m *VolumeMounter) Mount(ctx context.Context, mn *tork.Mount) error

func (*VolumeMounter) Unmount

func (m *VolumeMounter) Unmount(ctx context.Context, mn *tork.Mount) error

Jump to

Keyboard shortcuts

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