Documentation
¶
Overview ¶
Package docker provides the Docker container provider for sindoq.
Index ¶
- type Config
- type Instance
- func (i *Instance) Execute(ctx context.Context, code string, opts *executor.ExecutionOptions) (*executor.ExecutionResult, error)
- func (i *Instance) ExecuteStream(ctx context.Context, code string, opts *executor.ExecutionOptions, ...) error
- func (i *Instance) FileSystem() fs.FileSystem
- func (i *Instance) ID() string
- func (i *Instance) Network() provider.Network
- func (i *Instance) RunCommand(ctx context.Context, cmd string, args []string) (*executor.CommandResult, error)
- func (i *Instance) Status(ctx context.Context) (provider.InstanceStatus, error)
- func (i *Instance) Stop(ctx context.Context) error
- type Provider
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 ¶
func (i *Instance) Execute(ctx context.Context, code string, opts *executor.ExecutionOptions) (*executor.ExecutionResult, error)
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) RunCommand ¶
func (i *Instance) RunCommand(ctx context.Context, cmd string, args []string) (*executor.CommandResult, error)
RunCommand executes a shell command.
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider implements the Docker container provider.
func (*Provider) Capabilities ¶
func (p *Provider) Capabilities() provider.Capabilities
Capabilities returns Docker provider capabilities.
Click to show internal directories.
Click to hide internal directories.