docker

package
v0.0.0-...-b6f00c3 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2026 License: MIT Imports: 19 Imported by: 0

Documentation

Overview

Package docker provides the Docker container provider for sindoq.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Host         string
	APIVersion   string
	TLSVerify    bool
	CertPath     string
	RegistryAuth map[string]string
	DefaultImage string
}

Config holds Docker provider configuration.

func DefaultConfig

func DefaultConfig() *Config

DefaultConfig returns default Docker configuration.

type Instance

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

Instance represents a running Docker container.

func (*Instance) Execute

Execute runs code in the container.

func (*Instance) ExecuteStream

func (i *Instance) ExecuteStream(ctx context.Context, code string, opts *executor.ExecutionOptions, handler executor.StreamHandler) error

ExecuteStream runs code with streaming output.

func (*Instance) FileSystem

func (i *Instance) FileSystem() fs.FileSystem

FileSystem returns the file system handler.

func (*Instance) ID

func (i *Instance) ID() string

ID returns the container ID.

func (*Instance) Network

func (i *Instance) Network() provider.Network

Network returns the network handler.

func (*Instance) RunCommand

func (i *Instance) RunCommand(ctx context.Context, cmd string, args []string) (*executor.CommandResult, error)

RunCommand executes a shell command.

func (*Instance) Status

Status returns the current status.

func (*Instance) Stop

func (i *Instance) Stop(ctx context.Context) error

Stop terminates the container.

type Provider

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

Provider implements the Docker container provider.

func New

func New(cfg *Config) (*Provider, error)

New creates a new Docker provider.

func (*Provider) Capabilities

func (p *Provider) Capabilities() provider.Capabilities

Capabilities returns Docker provider capabilities.

func (*Provider) Close

func (p *Provider) Close() error

Close releases provider resources.

func (*Provider) Create

Create initializes a new container sandbox.

func (*Provider) Name

func (p *Provider) Name() string

Name returns the provider identifier.

func (*Provider) Validate

func (p *Provider) Validate(ctx context.Context) error

Validate checks if Docker is available.

Jump to

Keyboard shortcuts

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