docker

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2026 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PruneVolumeCache

func PruneVolumeCache(path string, blueprint string) error

Types

type Backend

type Backend interface {
	EnsureNetwork(ctx context.Context, name string) (bool, error)
	EnsureVolume(ctx context.Context, name string) (bool, error)
	EnsureContainer(ctx context.Context, spec ContainerSpec) (ContainerState, error)
	RemoveContainer(ctx context.Context, name string) error
	RemoveNetwork(ctx context.Context, name string) error
	RemoveVolume(ctx context.Context, name string) error
}

type CLI

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

func NewCLI

func NewCLI(opts Options) *CLI

func (*CLI) Down

func (c *CLI) Down(ctx context.Context, blueprint string, plan *envstarlark.RuntimePlan) error

func (*CLI) Up

type ContainerSpec

type ContainerSpec struct {
	Name    string
	Image   string
	Network string
	Env     map[string]string
	Ports   []string
	Volumes []string
}

type ContainerState added in v0.4.1

type ContainerState struct {
	Created bool
	// Ports maps container ports ("27017/tcp") to the host ports an existing
	// container is actually bound to. Reused containers keep the bindings they
	// were created with, which may differ from the ports in the current spec.
	Ports map[string]string
}

type FileVolumeNamer

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

func NewFileVolumeNamer

func NewFileVolumeNamer(path string, projectName string) *FileVolumeNamer

func (*FileVolumeNamer) Name

func (n *FileVolumeNamer) Name(_ context.Context, blueprint string, dependency string, path string) (string, error)

type MemoryVolumeNamer

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

func NewMemoryVolumeNamer

func NewMemoryVolumeNamer(projectName string) *MemoryVolumeNamer

func (*MemoryVolumeNamer) Name

func (n *MemoryVolumeNamer) Name(_ context.Context, blueprint string, dependency string, path string) (string, error)

type Options

type Options struct {
	Backend         Backend
	PortAllocator   PortAllocator
	VolumeNamer     VolumeNamer
	ReadinessRunner ReadinessRunner
	Shell           string
}

type PortAllocator

type PortAllocator interface {
	Allocate(ctx context.Context) (int, error)
}

type ReadinessRunner

type ReadinessRunner interface {
	Run(ctx context.Context, shell string, command string, env map[string]string) error
}

type VolumeNamer

type VolumeNamer interface {
	Name(ctx context.Context, blueprint string, dependency string, path string) (string, error)
}

Jump to

Keyboard shortcuts

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