Documentation
¶
Overview ¶
Package docker provides clawker-specific Docker middleware. It wraps pkg/whail with clawker's label conventions and naming schemes.
Package docker re-exports types from whail for use by commands. This allows commands to import internal/docker as their single Docker interface.
Index ¶
- Constants
- func BindOverlayDirsFromPatterns(patterns []string) []string
- func BuildKitEnabled(ctx context.Context, p Pinger) (bool, error)deprecated
- func ContainerName(project, agent string) (string, error)
- func ContainerNamePrefix(project string) string
- func ContainerNamesFromAgents(project string, agents []string) ([]string, error)
- func FindIgnoredDirs(log *logger.Logger, hostPath string, patterns []string) ([]string, error)
- func GenerateRandomName() string
- func GlobalVolumeName(purpose string) string
- func ImageTag(project string) string
- func ImageTagWithHash(project, hash string) string
- func LoadIgnorePatterns(ignoreFile string) ([]string, error)
- func ParseCPUs(value string) (int64, error)
- func ParseContainerName(name string) (project, agent string, ok bool)
- func RuntimeEnv(opts RuntimeEnvOpts) ([]string, error)
- func TestLabelConfig(cfg config.Config, testName ...string) whail.LabelConfig
- func ValidateResourceName(name string) error
- func VolumeName(project, agent, purpose string) (string, error)
- func WireBuildKit(c *Client)
- type BuildDefaultImageFn
- type BuildImageOpts
- type BuildProgressFunc
- type Builder
- type BuilderOptions
- type Client
- func (c *Client) AgentFilter(project, agent string) whail.Filters
- func (c *Client) BuildDefaultImage(ctx context.Context, flavor string, onProgress whail.BuildProgressFunc) error
- func (c *Client) BuildImage(ctx context.Context, buildContext io.Reader, opts BuildImageOpts) error
- func (c *Client) ClawkerFilter() whail.Filters
- func (c *Client) Close() error
- func (c *Client) ContainerLabels(project, agent, version, image, workdir string) map[string]string
- func (c *Client) CopyToVolume(ctx context.Context, volumeName, srcDir, destPath string, ...) error
- func (c *Client) EnsureVolume(ctx context.Context, name string, labels map[string]string) (bool, error)
- func (c *Client) FindContainerByAgent(ctx context.Context, project, agent string) (string, *container.Summary, error)
- func (c *Client) GlobalVolumeLabels(purpose string) map[string]string
- func (c *Client) ImageExists(ctx context.Context, imageRef string) (bool, error)
- func (c *Client) ImageLabels(project, version string) map[string]string
- func (c *Client) IsMonitoringActive(ctx context.Context) bool
- func (c *Client) ListContainers(ctx context.Context, includeAll bool) ([]Container, error)
- func (c *Client) ListContainersByProject(ctx context.Context, project string, includeAll bool) ([]Container, error)
- func (c *Client) NetworkLabels() map[string]string
- func (c *Client) ProjectFilter(project string) whail.Filters
- func (c *Client) RemoveContainerWithVolumes(ctx context.Context, containerID string, force bool) error
- func (c *Client) ResolveImage(ctx context.Context, projectName string) (string, error)
- func (c *Client) ResolveImageWithSource(ctx context.Context, projectName string) (*ResolvedImage, error)
- func (c *Client) TagImage(ctx context.Context, source, target string) error
- func (c *Client) VolumeLabels(project, agent, purpose string) map[string]string
- type ClientOption
- type Container
- type ContainerAttachOptions
- type ContainerCreateOptions
- type ContainerInspectOptions
- type ContainerInspectResult
- type ContainerListOptions
- type ContainerLogsOptions
- type ContainerRemoveOptions
- type ContainerStartOptions
- type ContainerUpdateResult
- type ContainerWaitCondition
- type CopyFromContainerOptions
- type CopyToContainerOptions
- type DeviceOpt
- type DockerError
- type EnsureNetworkOptions
- type ExecAttachOptions
- type ExecCreateOptions
- type ExecInspectOptions
- type ExecInspectResult
- type ExecResizeOptions
- type ExecStartOptions
- type Filters
- type GpuOpts
- type HijackedResponse
- type ImageBuildOptions
- type ImageListOptions
- type ImageListResult
- type ImagePullOptions
- type ImageRemoveOptions
- type ImageSource
- type ImageSummary
- type Labels
- type MemBytes
- type MemSwapBytes
- type MountOpt
- type NanoCPUs
- type NetworkCreateOptions
- type NetworkInspectOptions
- type PTYHandler
- func (p *PTYHandler) GetSize() (width, height int, err error)
- func (p *PTYHandler) IsTerminal() bool
- func (p *PTYHandler) Restore() error
- func (p *PTYHandler) Setup() error
- func (p *PTYHandler) Stream(ctx context.Context, hijacked HijackedResponse) error
- func (p *PTYHandler) StreamWithResize(ctx context.Context, hijacked HijackedResponse, ...) error
- type Pingerdeprecated
- type ResolvedImage
- type Resources
- type RestartPolicy
- type RuntimeEnvOpts
- type SDKContainerCreateOptions
- type ThrottleDeviceOpt
- type UlimitOpt
- type UpdateConfig
- type VolumeCreateOptions
- type WeightDeviceOpt
Constants ¶
const ( // WaitConditionNotRunning is used to wait until a container is not running. WaitConditionNotRunning = whail.WaitConditionNotRunning WaitConditionNextExit = whail.WaitConditionNextExit WaitConditionRemoved = whail.WaitConditionRemoved )
const DefaultImageTag = "clawker-default:latest"
DefaultImageTag is the tag used for the user's default base image.
const NamePrefix = "clawker"
NamePrefix is used for all clawker resource names.
Variables ¶
This section is empty.
Functions ¶
func BindOverlayDirsFromPatterns ¶ added in v0.1.9
BindOverlayDirsFromPatterns derives directory overlay targets from ignore patterns for bind mode. It intentionally only returns deterministic directory paths and skips file-glob patterns.
func ContainerName ¶
ContainerName generates container name: clawker.project.agent Returns an error if project or agent names contain invalid characters.
func ContainerNamePrefix ¶
ContainerNamePrefix returns prefix for filtering: clawker.project.
func ContainerNamesFromAgents ¶
ContainerNamesFromAgents resolves a slice of agent names to container names. If no agents are provided, returns the input slice unchanged. Returns an error if any agent or the project name is invalid.
func FindIgnoredDirs ¶ added in v0.1.9
FindIgnoredDirs walks hostPath and returns relative paths of directories matching the given ignore patterns. Used by bind mode to generate tmpfs overlay mounts that mask ignored directories inside the container.
Key differences from snapshot's shouldIgnore:
- Only returns directories (file patterns like *.log are not actionable)
- Does NOT mask .git/ (bind mode needs git for live development)
- Skips recursion into matched directories (performance)
func GenerateRandomName ¶
func GenerateRandomName() string
GenerateRandomName generates a Docker-style random name (adjective-noun).
func GlobalVolumeName ¶
GlobalVolumeName returns the name for a global (non-agent-scoped) volume. Example: GlobalVolumeName("globals") → "clawker-globals"
func ImageTagWithHash ¶
ImageTagWithHash generates a content-addressed image tag: clawker-project:sha-<hash>
func LoadIgnorePatterns ¶
LoadIgnorePatterns reads patterns from an ignore file.
func ParseContainerName ¶
ParseContainerName extracts project and agent from container name. Container name format: clawker.project.agent Returns empty strings and false if the name doesn't match the format.
func RuntimeEnv ¶
func RuntimeEnv(opts RuntimeEnvOpts) ([]string, error)
RuntimeEnv produces container environment variables from explicit options. Precedence (last wins): base defaults → terminal capabilities → agent env → instruction env. The result is sorted by key for deterministic ordering.
func TestLabelConfig ¶
func TestLabelConfig(cfg config.Config, testName ...string) whail.LabelConfig
TestLabelConfig returns a LabelConfig that adds the test label to all resource types. Use with WithLabels in test code to ensure CleanupTestResources can find and remove test-created resources.
When testName is provided (typically t.Name()), the test name label is also set, enabling per-test resource debugging:
docker ps -a --filter label=dev.clawker.test.name=TestMyFunction docker volume ls --filter label=dev.clawker.test.name=TestMyFunction
func ValidateResourceName ¶ added in v0.1.2
ValidateResourceName validates that a name is suitable for use in Docker resource names. Matches Docker CLI's container name rules: [a-zA-Z0-9][a-zA-Z0-9_.-]* with a max length of 128.
func VolumeName ¶
VolumeName generates volume name: clawker.project.agent-purpose Returns an error if project or agent names contain invalid characters. The purpose parameter is not validated as it is always a hardcoded internal string.
func WireBuildKit ¶
func WireBuildKit(c *Client)
WireBuildKit sets up the BuildKit image builder on the given Client. This encapsulates the buildkit subpackage dependency so callers don't need to import pkg/whail/buildkit directly.
Types ¶
type BuildDefaultImageFn ¶
type BuildDefaultImageFn func(ctx context.Context, flavor string, onProgress BuildProgressFunc) error
BuildDefaultImageFn is the function signature for building the default image. Matches (*Client).BuildDefaultImage. Used by shared/image.go for DI.
type BuildImageOpts ¶
type BuildImageOpts struct {
Tags []string // -t, --tag (multiple allowed)
Dockerfile string // -f, --file
BuildArgs map[string]*string // --build-arg KEY=VALUE
NoCache bool // --no-cache
Labels map[string]string // --label KEY=VALUE (merged with clawker labels)
Target string // --target
Pull bool // --pull (maps to PullParent)
SuppressOutput bool // -q, --quiet
NetworkMode string // --network
BuildKitEnabled bool // Use BuildKit builder via whail.ImageBuildKit
ContextDir string // Build context directory (required for BuildKit)
OnProgress whail.BuildProgressFunc // Progress callback for build events
}
BuildImageOpts contains options for building an image.
type BuildProgressFunc ¶
type BuildProgressFunc = whail.BuildProgressFunc
BuildProgressFunc is a callback for reporting build progress events.
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
Builder handles Docker image building for clawker projects.
func NewBuilder ¶
NewBuilder creates a new Builder instance. projectName is the resolved project identity (from ProjectManager); empty string for unregistered projects. The builder inherits the logger from the Client.
func (*Builder) EnsureImage ¶
EnsureImage ensures an image is available, building if necessary. Uses content-addressed tags to detect whether config actually changed. If ForceBuild is true, rebuilds even if the image exists.
type BuilderOptions ¶
type BuilderOptions struct {
ForceBuild bool // Force rebuild even if image exists
NoCache bool // Build without Docker cache
Labels map[string]string // Labels to apply to the built image
Target string // Multi-stage build target
Pull bool // Always pull base image
SuppressOutput bool // Suppress build output
NetworkMode string // Network mode for build
BuildArgs map[string]*string // Build-time variables
Tags []string // Additional tags for the image (merged with imageTag)
Dockerfile []byte // Pre-rendered Dockerfile bytes (avoids re-generation)
BuildKitEnabled bool // Use BuildKit builder for cache mount support
OnProgress whail.BuildProgressFunc // Progress callback for build events
}
BuilderOptions contains options for build operations.
type Client ¶
type Client struct {
*whail.Engine
// BuildDefaultImageFunc overrides BuildDefaultImage when non-nil.
// Used by fawker/tests to inject fake build behavior.
// Follows the same pattern as whail.Engine.BuildKitImageBuilder.
BuildDefaultImageFunc BuildDefaultImageFn
// ChownImage overrides the image used for CopyToVolume's chown step.
// When empty, defaults to "busybox:latest". Tests set this to a locally-built
// labeled image to avoid DockerHub pulls and ensure test-label propagation.
ChownImage string
// contains filtered or unexported fields
}
Client embeds whail.Engine with clawker-specific label configuration. All whail.Engine methods are available directly on Client. Additional methods provide clawker-specific high-level operations.
func NewClientFromEngine ¶ added in v0.2.0
NewClientFromEngine creates a Client from an existing Engine and config. Intended for testing — production code should use NewClient. When log is nil, a Nop logger is used.
func (*Client) AgentFilter ¶ added in v0.2.0
AgentFilter returns Docker filter for a specific agent within a project.
func (*Client) BuildDefaultImage ¶
func (c *Client) BuildDefaultImage(ctx context.Context, flavor string, onProgress whail.BuildProgressFunc) error
BuildDefaultImage builds the default clawker base image with the given flavor. It resolves the latest Claude Code version from npm, generates a Dockerfile, and builds the image with clawker's managed labels.
func (*Client) BuildImage ¶
BuildImage builds a Docker image from a build context. When BuildKitEnabled and ContextDir are set, uses whail's BuildKit path (which supports --mount=type=cache). Otherwise falls back to the legacy Docker SDK ImageBuild API.
func (*Client) ClawkerFilter ¶ added in v0.2.0
ClawkerFilter returns Docker filter for listing all clawker resources.
func (*Client) ContainerLabels ¶ added in v0.2.0
ContainerLabels returns labels for a new container.
func (*Client) CopyToVolume ¶
func (c *Client) CopyToVolume(ctx context.Context, volumeName, srcDir, destPath string, ignorePatterns []string) error
CopyToVolume copies a directory to a Docker volume using a temporary container.
func (*Client) EnsureVolume ¶
func (c *Client) EnsureVolume(ctx context.Context, name string, labels map[string]string) (bool, error)
EnsureVolume creates a volume if it doesn't exist, returns true if created.
func (*Client) FindContainerByAgent ¶
func (c *Client) FindContainerByAgent(ctx context.Context, project, agent string) (string, *container.Summary, error)
FindContainerByAgent finds a container by project and agent name. Returns the container name, container details, and any error. Returns (name, nil, nil) if container not found.
func (*Client) GlobalVolumeLabels ¶ added in v0.2.0
GlobalVolumeLabels returns labels for a global (non-agent-scoped) volume. Only includes managed and purpose labels — no project or agent.
func (*Client) ImageExists ¶
ImageExists checks if a managed image exists locally. Returns true if the image exists and is managed, false if not found or unmanaged.
func (*Client) ImageLabels ¶ added in v0.2.0
ImageLabels returns labels for a built image.
func (*Client) IsMonitoringActive ¶
IsMonitoringActive checks if the clawker monitoring stack is running. It looks for the otel-collector container on the clawker-net network.
func (*Client) ListContainers ¶
ListContainers returns all clawker-managed containers.
func (*Client) ListContainersByProject ¶
func (c *Client) ListContainersByProject(ctx context.Context, project string, includeAll bool) ([]Container, error)
ListContainersByProject returns containers for a specific project.
func (*Client) NetworkLabels ¶ added in v0.2.0
NetworkLabels returns labels for a new network.
func (*Client) ProjectFilter ¶ added in v0.2.0
ProjectFilter returns Docker filter for a specific project.
func (*Client) RemoveContainerWithVolumes ¶
func (c *Client) RemoveContainerWithVolumes(ctx context.Context, containerID string, force bool) error
RemoveContainerWithVolumes removes a container and its associated volumes. If force is true, volume cleanup errors are logged but not returned. If force is false, volume cleanup errors are returned.
func (*Client) ResolveImage ¶
ResolveImage resolves the image reference to use. projectName is the resolved project identity (from ProjectManager); empty for unregistered projects. Returns empty string if no image could be resolved.
func (*Client) ResolveImageWithSource ¶
func (c *Client) ResolveImageWithSource(ctx context.Context, projectName string) (*ResolvedImage, error)
ResolveImageWithSource resolves the image to use for container operations. projectName is the resolved project identity (from ProjectManager); empty for unregistered projects.
Resolution order:
- Docker label lookup — clawker-managed image matching project label with :latest tag
- Config fallback — merged build.image from all config layers (project, user, defaults)
Returns nil if no image could be resolved (caller decides what to do).
type ClientOption ¶
type ClientOption func(*clientOptions)
ClientOption configures a NewClient call.
func WithLabels ¶
func WithLabels(labels whail.LabelConfig) ClientOption
WithLabels injects additional labels into the whail engine. Use this to add test labels (e.g., dev.clawker.test=true) that propagate to all containers, volumes, and networks created by the client.
type Container ¶
type Container struct {
ID string
Name string
Project string
Agent string
Image string
Workdir string
Status string
Created int64
}
Container represents a clawker-managed container with parsed metadata.
type ContainerAttachOptions ¶
type ContainerAttachOptions = whail.ContainerAttachOptions
Container operation options. ContainerCreateOptions is whail's custom struct with clawker-specific fields. SDKContainerCreateOptions is the raw Docker SDK type for direct API calls.
type ContainerCreateOptions ¶
type ContainerCreateOptions = whail.ContainerCreateOptions
Type aliases re-exported from whail. Commands should use these types rather than importing whail directly.
type ContainerInspectOptions ¶
type ContainerInspectOptions = whail.ContainerInspectOptions
Container result types
type ContainerInspectResult ¶
type ContainerInspectResult = whail.ContainerInspectResult
Type aliases re-exported from whail. Commands should use these types rather than importing whail directly.
type ContainerListOptions ¶
type ContainerListOptions = whail.ContainerListOptions
Type aliases re-exported from whail. Commands should use these types rather than importing whail directly.
type ContainerLogsOptions ¶
type ContainerLogsOptions = whail.ContainerLogsOptions
Type aliases re-exported from whail. Commands should use these types rather than importing whail directly.
type ContainerRemoveOptions ¶
type ContainerRemoveOptions = whail.ContainerRemoveOptions
Type aliases re-exported from whail. Commands should use these types rather than importing whail directly.
type ContainerStartOptions ¶
type ContainerStartOptions = whail.ContainerStartOptions
Whail-specific container types.
type ContainerUpdateResult ¶
type ContainerUpdateResult = whail.ContainerUpdateResult
Container configuration types.
type ContainerWaitCondition ¶
type ContainerWaitCondition = whail.WaitCondition
Type aliases re-exported from whail. Commands should use these types rather than importing whail directly.
type CopyFromContainerOptions ¶
type CopyFromContainerOptions = whail.CopyFromContainerOptions
Type aliases re-exported from whail. Commands should use these types rather than importing whail directly.
type CopyToContainerOptions ¶
type CopyToContainerOptions = whail.CopyToContainerOptions
Copy operation options.
type DeviceOpt ¶
type DeviceOpt struct {
// contains filtered or unexported fields
}
DeviceOpt holds device mapping specifications. Implements pflag.Value interface.
func (*DeviceOpt) GetAll ¶
func (o *DeviceOpt) GetAll() []container.DeviceMapping
GetAll returns all device mappings.
func (*DeviceOpt) Set ¶
Set parses a device specification in the format "host[:container[:permissions]]".
type EnsureNetworkOptions ¶
type EnsureNetworkOptions = whail.EnsureNetworkOptions
Type aliases re-exported from whail. Commands should use these types rather than importing whail directly.
type ExecAttachOptions ¶
type ExecAttachOptions = whail.ExecAttachOptions
Type aliases re-exported from whail. Commands should use these types rather than importing whail directly.
type ExecCreateOptions ¶
type ExecCreateOptions = whail.ExecCreateOptions
Exec operation options and results.
type ExecInspectOptions ¶
type ExecInspectOptions = whail.ExecInspectOptions
Type aliases re-exported from whail. Commands should use these types rather than importing whail directly.
type ExecInspectResult ¶
type ExecInspectResult = whail.ExecInspectResult
Type aliases re-exported from whail. Commands should use these types rather than importing whail directly.
type ExecResizeOptions ¶
type ExecResizeOptions = whail.ExecResizeOptions
Type aliases re-exported from whail. Commands should use these types rather than importing whail directly.
type ExecStartOptions ¶
type ExecStartOptions = whail.ExecStartOptions
Type aliases re-exported from whail. Commands should use these types rather than importing whail directly.
type GpuOpts ¶
type GpuOpts struct {
// contains filtered or unexported fields
}
GpuOpts holds GPU device request configuration. Implements pflag.Value interface.
func (*GpuOpts) GetAll ¶
func (o *GpuOpts) GetAll() []container.DeviceRequest
GetAll returns all device requests.
type ImageBuildOptions ¶
type ImageBuildOptions = whail.ImageBuildOptions
Type aliases re-exported from whail. Commands should use these types rather than importing whail directly.
type ImageListResult ¶
type ImageListResult = whail.ImageListResult
Type aliases re-exported from whail. Commands should use these types rather than importing whail directly.
type ImagePullOptions ¶
type ImagePullOptions = whail.ImagePullOptions
Type aliases re-exported from whail. Commands should use these types rather than importing whail directly.
type ImageRemoveOptions ¶
type ImageRemoveOptions = whail.ImageRemoveOptions
Type aliases re-exported from whail. Commands should use these types rather than importing whail directly.
type ImageSource ¶
type ImageSource string
ImageSource indicates where an image reference was resolved from.
const ( ImageSourceExplicit ImageSource = "explicit" // User specified via CLI or args ImageSourceProject ImageSource = "project" // Found via project label search ImageSourceConfig ImageSource = "config" // From merged config (build.image) )
type Labels ¶
Type aliases re-exported from whail. Commands should use these types rather than importing whail directly.
type MemBytes ¶
type MemBytes int64
MemBytes is a type for human readable memory bytes (like 128M, 2g, etc)
func (*MemBytes) UnmarshalJSON ¶
UnmarshalJSON is the customized unmarshaler for MemBytes
type MemSwapBytes ¶
type MemSwapBytes int64
MemSwapBytes is a type for human readable memory bytes (like 128M, 2g, etc). It differs from MemBytes in that -1 is valid and the default.
func (*MemSwapBytes) Set ¶
func (m *MemSwapBytes) Set(value string) error
Set sets the value of the MemSwapBytes by passing a string
func (*MemSwapBytes) String ¶
func (m *MemSwapBytes) String() string
func (*MemSwapBytes) UnmarshalJSON ¶
func (m *MemSwapBytes) UnmarshalJSON(s []byte) error
UnmarshalJSON is the customized unmarshaler for MemSwapBytes
type MountOpt ¶
type MountOpt struct {
// contains filtered or unexported fields
}
MountOpt holds mount specifications. Implements pflag.Value interface.
func (*MountOpt) Set ¶
Set parses a mount specification in the format "type=X,source=Y,target=Z[,option=value...]".
type NanoCPUs ¶
type NanoCPUs int64
NanoCPUs is a type for fixed point fractional number.
type NetworkCreateOptions ¶
type NetworkCreateOptions = whail.NetworkCreateOptions
Network operation options.
type NetworkInspectOptions ¶
type NetworkInspectOptions = whail.NetworkInspectOptions
Type aliases re-exported from whail. Commands should use these types rather than importing whail directly.
type PTYHandler ¶
type PTYHandler struct {
// contains filtered or unexported fields
}
PTYHandler manages the pseudo-terminal connection to a container
func NewPTYHandler ¶
func NewPTYHandler(log *logger.Logger) *PTYHandler
NewPTYHandler creates a new PTY handler. When log is nil, a Nop logger is used.
func (*PTYHandler) GetSize ¶
func (p *PTYHandler) GetSize() (width, height int, err error)
GetSize returns the current terminal size
func (*PTYHandler) IsTerminal ¶
func (p *PTYHandler) IsTerminal() bool
IsTerminal returns true if stdin is a terminal
func (*PTYHandler) Restore ¶
func (p *PTYHandler) Restore() error
Restore returns the terminal to its original state. It first resets the terminal visual state (alternate screen, cursor visibility, text attributes) before restoring termios settings.
func (*PTYHandler) Setup ¶
func (p *PTYHandler) Setup() error
Setup prepares the terminal for PTY interaction
func (*PTYHandler) Stream ¶
func (p *PTYHandler) Stream(ctx context.Context, hijacked HijackedResponse) error
Stream handles bidirectional I/O between local terminal and container
func (*PTYHandler) StreamWithResize ¶
func (p *PTYHandler) StreamWithResize( ctx context.Context, hijacked HijackedResponse, resizeFunc func(height, width uint) error, ) error
StreamWithResize handles bidirectional I/O with terminal resize support
type ResolvedImage ¶
type ResolvedImage struct {
Reference string // The image reference (name:tag)
Source ImageSource // Where the image was resolved from
}
ResolvedImage contains the result of image resolution with source tracking.
type RuntimeEnvOpts ¶
type RuntimeEnvOpts struct {
// Clawker identity (consumed by statusline)
Version string
Project string
Agent string
WorkspaceMode string // "bind" or "snapshot"
WorkspaceSource string // host path being mounted
// Editor preferences
Editor string
Visual string
// Firewall
FirewallEnabled bool
FirewallDomains []string
FirewallIPRangeSources []config.IPRangeSource
// Monitoring stack
MonitoringActive bool // Whether the monitoring stack (otel-collector) is running
// Socket forwarding (consumed by socket-forwarder in container)
GPGForwardingEnabled bool // Enable GPG agent forwarding
SSHForwardingEnabled bool // Enable SSH agent forwarding
// Terminal capabilities (from host)
Is256Color bool
TrueColor bool
// User-defined overrides (arbitrary pass-through)
AgentEnv map[string]string
InstructionEnv map[string]string
}
RuntimeEnvOpts describes the environment variables RuntimeEnv can produce. Each field maps to a specific env var or category of env vars.
type SDKContainerCreateOptions ¶
type SDKContainerCreateOptions = whail.SDKContainerCreateOptions
Type aliases re-exported from whail. Commands should use these types rather than importing whail directly.
type ThrottleDeviceOpt ¶
type ThrottleDeviceOpt struct {
// contains filtered or unexported fields
}
ThrottleDeviceOpt holds block IO throttle device settings. Implements pflag.Value interface.
func NewThrottleDeviceOpt ¶
func NewThrottleDeviceOpt(isBytes bool) *ThrottleDeviceOpt
NewThrottleDeviceOpt creates a new ThrottleDeviceOpt. Set isBytes to true for byte rate limits, false for IO rate limits.
func (*ThrottleDeviceOpt) GetAll ¶
func (o *ThrottleDeviceOpt) GetAll() []*blkiodev.ThrottleDevice
GetAll returns all throttle devices.
func (*ThrottleDeviceOpt) Len ¶
func (o *ThrottleDeviceOpt) Len() int
Len returns the number of throttle devices.
func (*ThrottleDeviceOpt) Set ¶
func (o *ThrottleDeviceOpt) Set(value string) error
Set parses a throttle device value in the format "device:rate". For byte rates, human-readable sizes are accepted (e.g., "1mb"). For IO rates, only numeric values are accepted.
func (*ThrottleDeviceOpt) String ¶
func (o *ThrottleDeviceOpt) String() string
String returns a string representation.
func (*ThrottleDeviceOpt) Type ¶
func (o *ThrottleDeviceOpt) Type() string
Type returns the type string for pflag.
type UlimitOpt ¶
type UlimitOpt struct {
// contains filtered or unexported fields
}
UlimitOpt holds a list of ulimits parsed from --ulimit flags. Implements pflag.Value interface.
type VolumeCreateOptions ¶
type VolumeCreateOptions = whail.VolumeCreateOptions
Volume operation options.
type WeightDeviceOpt ¶
type WeightDeviceOpt struct {
// contains filtered or unexported fields
}
WeightDeviceOpt holds block IO weight device settings. Implements pflag.Value interface.
func NewWeightDeviceOpt ¶
func NewWeightDeviceOpt() *WeightDeviceOpt
NewWeightDeviceOpt creates a new WeightDeviceOpt.
func (*WeightDeviceOpt) GetAll ¶
func (o *WeightDeviceOpt) GetAll() []*blkiodev.WeightDevice
GetAll returns all weight devices.
func (*WeightDeviceOpt) Len ¶
func (o *WeightDeviceOpt) Len() int
Len returns the number of weight devices.
func (*WeightDeviceOpt) Set ¶
func (o *WeightDeviceOpt) Set(value string) error
Set parses a weight device value in the format "device:weight".
func (*WeightDeviceOpt) String ¶
func (o *WeightDeviceOpt) String() string
String returns a string representation.
func (*WeightDeviceOpt) Type ¶
func (o *WeightDeviceOpt) Type() string
Type returns the type string for pflag.
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package dockertest provides test doubles for internal/docker.Client.
|
Package dockertest provides test doubles for internal/docker.Client. |