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 AgentFilter(project, agent string) whail.Filters
- func BuildKitEnabled(ctx context.Context, p Pinger) (bool, error)
- func ClawkerFilter() whail.Filters
- func ContainerLabels(project, agent, version, image, workdir string) map[string]string
- func ContainerName(project, agent string) string
- func ContainerNamePrefix(project string) string
- func ContainerNamesFromAgents(project string, agents []string) []string
- func GenerateRandomName() string
- func GlobalVolumeLabels(purpose string) map[string]string
- func GlobalVolumeName(purpose string) string
- func ImageLabels(project, version string) map[string]string
- func ImageTag(project string) string
- func ImageTagWithHash(project, hash string) string
- func LoadIgnorePatterns(ignoreFile string) ([]string, error)
- func NetworkLabels() map[string]string
- func ParseCPUs(value string) (int64, error)
- func ParseContainerName(name string) (project, agent string, ok bool)
- func ProjectFilter(project string) whail.Filters
- func ResolveDefaultImage(cfg *config.Project, settings *config.Settings) string
- func RuntimeEnv(opts RuntimeEnvOpts) ([]string, error)
- func TestLabelConfig(testName ...string) whail.LabelConfig
- func VolumeLabels(project, agent, purpose string) map[string]string
- func VolumeName(project, agent, purpose string) string
- func WireBuildKit(c *Client)
- type BuildDefaultImageFn
- type BuildImageOpts
- type BuildProgressFunc
- type Builder
- type BuilderOptions
- type Client
- 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) Close() error
- 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) ImageExists(ctx context.Context, imageRef string) (bool, error)
- 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) RemoveContainerWithVolumes(ctx context.Context, containerID string, force bool) error
- func (c *Client) ResolveImage(ctx context.Context) (string, error)
- func (c *Client) ResolveImageWithSource(ctx context.Context) (*ResolvedImage, error)
- func (c *Client) SetConfig(cfg *config.Config)
- func (c *Client) TagImage(ctx context.Context, source, target string) error
- 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 Pinger
- type ResolvedImage
- type Resources
- type RestartPolicy
- type RuntimeEnvOpts
- type SDKContainerCreateOptions
- type ThrottleDeviceOpt
- type UlimitOpt
- type UpdateConfig
- type VolumeCreateOptions
- type WeightDeviceOpt
Constants ¶
const ( // LabelPrefix is the prefix for all clawker labels. LabelPrefix = "com.clawker." // LabelManaged marks a resource as managed by clawker. LabelManaged = LabelPrefix + "managed" // LabelProject identifies the project name. LabelProject = LabelPrefix + "project" // LabelAgent identifies the agent name within a project. LabelAgent = LabelPrefix + "agent" // LabelVersion stores the clawker version that created the resource. LabelVersion = LabelPrefix + "version" // LabelImage stores the source image tag for containers. LabelImage = LabelPrefix + "image" // LabelCreated stores the creation timestamp. LabelCreated = LabelPrefix + "created" // LabelWorkdir stores the host working directory. LabelWorkdir = LabelPrefix + "workdir" // LabelPurpose identifies the purpose of a volume. LabelPurpose = LabelPrefix + "purpose" // LabelTestName identifies the test function that created a resource. // Set automatically by TestLabelConfig(t.Name()) in integration tests. LabelTestName = LabelPrefix + "test.name" )
Clawker label keys for managed resources.
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 EngineLabelPrefix = "com.clawker"
EngineLabelPrefix is the label prefix for whail.EngineOptions (without trailing dot). Use this when configuring the whail Engine; it adds its own dot separator.
const EngineManagedLabel = "managed"
EngineManagedLabel is the managed label key for whail.EngineOptions.
const ManagedLabelValue = "true"
ManagedLabelValue is the value for the managed label.
const NamePrefix = "clawker"
NamePrefix is used for all clawker resource names.
const NetworkName = "clawker-net"
NetworkName is the name of the clawker network.
Variables ¶
This section is empty.
Functions ¶
func AgentFilter ¶
AgentFilter returns Docker filter for a specific agent within a project.
func BuildKitEnabled ¶
BuildKitEnabled checks whether BuildKit is available. Deprecated: Use whail.BuildKitEnabled directly.
func ClawkerFilter ¶
ClawkerFilter returns Docker filter for listing all clawker resources.
func ContainerLabels ¶
ContainerLabels returns labels for a new container.
func ContainerName ¶
ContainerName generates container name: clawker.project.agent
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.
func GenerateRandomName ¶
func GenerateRandomName() string
GenerateRandomName generates a Docker-style random name (adjective-noun).
func GlobalVolumeLabels ¶
GlobalVolumeLabels returns labels for a global (non-agent-scoped) volume. Only includes managed and purpose labels — no project or agent.
func GlobalVolumeName ¶
GlobalVolumeName returns the name for a global (non-agent-scoped) volume. Example: GlobalVolumeName("globals") → "clawker-globals"
func ImageLabels ¶
ImageLabels returns labels for a built image.
func ImageTagWithHash ¶
ImageTagWithHash generates a content-addressed image tag: clawker-project:sha-<hash>
func LoadIgnorePatterns ¶
LoadIgnorePatterns reads patterns from an ignore file.
func NetworkLabels ¶
NetworkLabels returns labels for a new network.
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 ProjectFilter ¶
ProjectFilter returns Docker filter for a specific project.
func ResolveDefaultImage ¶
ResolveDefaultImage returns the default_image from merged config/settings. Local project config takes precedence over user settings. Returns empty string if not configured.
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(testName ...string) whail.LabelConfig
TestLabelConfig returns a LabelConfig that adds com.clawker.test=true 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 label com.clawker.test.name is also set, enabling per-test resource debugging:
docker ps -a --filter label=com.clawker.test.name=TestMyFunction docker volume ls --filter label=com.clawker.test.name=TestMyFunction
func VolumeLabels ¶
VolumeLabels returns labels for a new volume.
func VolumeName ¶
VolumeName generates volume name: clawker.project.agent-purpose
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.
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 (*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) 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) 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) 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) 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. Returns empty string if no image could be resolved.
func (*Client) ResolveImageWithSource ¶
func (c *Client) ResolveImageWithSource(ctx context.Context) (*ResolvedImage, error)
ResolveImageWithSource resolves the image to use for container operations. Resolution order: 1. Project image with :latest tag (by label lookup) 2. Merged default_image from config/settings
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., com.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 ImageSourceDefault ImageSource = "default" // From config/settings default_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 (*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 Pinger ¶
Pinger is the subset of the Docker API needed for BuildKit detection. Deprecated: Use whail.Pinger directly.
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
FirewallOverride bool
FirewallIPRangeSources []config.IPRangeSource
// 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. |