Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RetryPolicy ¶
type RetryPolicy struct {
MaxAttempts int
InitialDelay time.Duration
MaxDelay time.Duration
Multiplier float64
}
RetryPolicy describes a capped exponential backoff with jitter.
type Runtime ¶
type Runtime struct {
// contains filtered or unexported fields
}
Runtime is the long-lived handle to whichever container engine is in use. Clients are cached so each RPC reuses the same daemon connection.
func NewRuntime ¶
func NewRuntime(opts RuntimeOptions) (*Runtime, error)
NewRuntime determines which runtime to talk to and validates the choice. Construction is eager but the underlying daemon client is created lazily on first use.
func (*Runtime) Kind ¶
func (r *Runtime) Kind() RuntimeKind
Kind returns the resolved runtime kind. Useful for diagnostics.
type RuntimeKind ¶
type RuntimeKind string
RuntimeKind enumerates the supported container runtimes.
const ( RuntimeDocker RuntimeKind = "docker" RuntimeContainerd RuntimeKind = "containerd" )
type RuntimeOptions ¶
type RuntimeOptions struct {
// Override forces a specific runtime ("docker" or "containerd"). When
// empty, the package picks based on the presence of host sockets and the
// CONTAINER_RUNTIME environment variable.
Override string
// ContainerdNamespace is the namespace used to look up containers in
// containerd. Default "k8s.io".
ContainerdNamespace string
// PushRetry tunes the retry policy for push operations. Zero values use
// sensible defaults; set MaxAttempts=1 to disable retries.
PushRetry RetryPolicy
// DockerSocket / ContainerdSocket override the auto-detection paths,
// primarily for tests.
DockerSocket string
ContainerdSocket string
}
RuntimeOptions controls how the runtime singleton is constructed.
Click to show internal directories.
Click to hide internal directories.