Documentation
¶
Overview ¶
Package kit is one vocabulary for Docker Engine and Compose.
Three nouns:
- Define a Container, Service, or Compose file in code (NewContainer, NewService, NewCompose)
- Load compose YAML from disk (ImportFile locally, Client.Load with a daemon)
- Run it through one Client (Connect, then Client.Run / Client.Up / Loaded.Up)
Import the kit package:
import "github.com/aptd3v/containerkit/pkg/kit"
cli, err := kit.Connect()
defer cli.Close()
created, err := cli.Run(ctx, kit.Name("web"), kit.Image("nginx"))
compose := kit.NewCompose("app").WithService(
kit.NewService(kit.Name("api"), kit.Image("alpine:latest")),
)
err = cli.Up(ctx, compose)
loaded, err := cli.Load(ctx, "compose.yaml")
err = loaded.Up(ctx)
Connect is the usual constructor. NewEngine and NewComposer remain when a program needs only one SDK. LoadProject is the advanced loader Client.Load wraps.
Build a compose file with Compose.WithService, Compose.WithNetwork, Compose.WithVolume, Compose.WithSecret, Compose.WithFile, and Compose.WithJob. AddService exists so [logic.Group] can carry a service; it is not the public grammar.
The same names apply at every scope they mean the same thing:
ReadOnly(true) // root filesystem
Volume(..., ReadOnly(true)) // one mount
Env("VERSION", "1") // container environment
Build(Source("."), Env("VERSION", "1")) // build-arg
Memory(1<<30) // mem_limit
Deploy(Memory(1<<30)) // deploy.resources.limits.memory
Meanings that only look the same have different names:
- File is a compose YAML path; secret/config content is FromFile; a Dockerfile path is DockerfilePath; an export archive is OutputFile
- Publish publishes a port; Compose.PublishOCI publishes an OCI artifact
- All includes stopped/list/prune candidates; AllResources is LoadProject
- Log is the progress Logger; container log drivers are Logging
- WorkingDir is a container working directory; ProjectDirectory is the compose project directory on LoadProject
Test is the healthcheck command only. Interval, timeout, and retries are Interval, Timeout, and Retries.
Constructors always return a value. Compose.Up, Container.Create, Compose.ExportYAML, and Compose.Write validate before they run. Container.Validate / Service.Validate / Compose.Validate are for checking earlier. Common finite values (TCP, Always, Bridge, JSONFile, PortHost, Replicated) live in this package; the long tail stays in pkg/cap, pkg/proto, and the other vocabulary packages.
A *Container is a ServiceOption, so NewService(NewContainer(Name("foo-server"), ...)) inherits the container name, or generates one from the image.
compose := ImportYAML(yml, Name("app"), Env("TAG", "latest"))
local := ImportFile("compose.yaml", File("compose.override.yaml"))
log := NewLogger(Color(true), Progress("auto"))
err = compose.Up(ctx, cli.Composer(), Detach(true), Log(log), Timeout(10*time.Second))
created, err := container.Create(ctx, cli.Engine(), Name("worker"))
err = BuildImage(ctx, cli.Engine(), NewDockerfile().From("alpine:latest"), Image("app:dev"), Log(log))
err = PullImage(ctx, cli.Engine(), "alpine:latest", Log(log))
Runtime failures are Error values classified onto ErrNotFound, ErrConflict, and the other SDK sentinels so errors.Is / IsNotFound work without importing Engine or Compose.
Configuration targets the latest stable modules verified on 2026-11-12:
- github.com/moby/moby/api v1.56.1
- github.com/moby/moby/client v0.6.2
- github.com/compose-spec/compose-go/v2 v2.16.2
- github.com/docker/compose/v5 v5.6.1 (runtime API + in-process Composer)
Engine AutoRemove, PublishAll, ContainerIDFile, Shell, OnBuild, MaskedPath, and ReadonlyPath have no Compose equivalent; FromContainer reports them.
Example ¶
package main
import (
"bytes"
"fmt"
"github.com/aptd3v/containerkit/pkg/kit"
)
func main() {
container := kit.NewContainer(
kit.Name("worker"),
kit.Image("alpine:latest"),
)
myService := kit.NewService(
kit.NewContainer(
kit.Name("foo-server"),
kit.Image("alpine:latest"),
),
)
compose := kit.NewCompose("app").
WithService(myService).
WithService(kit.NewService(
kit.Name("api"),
kit.Image("alpine:latest"),
kit.Publish(
kit.Protocol(kit.TCP),
kit.HostIP("0.0.0.0"),
kit.HostPort(8080),
kit.ContainerPort(80),
),
))
fmt.Println(container.Name(), container.Image())
fmt.Println(myService.Name(), myService.Image())
fmt.Println(compose.Name(), compose.Services()[0].Name(), compose.Services()[1].Name())
var buf bytes.Buffer
if err := compose.Write(kit.Export{Writer: &buf}); err != nil {
panic(err)
}
fmt.Println(bytes.Contains(buf.Bytes(), []byte("alpine:latest")))
}
Output: worker alpine:latest foo-server alpine:latest app foo-server api true
Index ¶
- Constants
- Variables
- func AttachTerminal(ctx context.Context, api Engine, id string, in *os.File, out io.Writer, ...) (*terminal.Session, error)
- func BuildImage(ctx context.Context, api Engine, opts ...EngineBuildOption) error
- func ClassOf(err error) error
- func ClientVersion(api Engine) (string, error)
- func CopyMultiplexed(out, errw io.Writer, src io.Reader) (int64, error)
- func DaemonHost(api Engine) (string, error)
- func DecodeAction(op string, v any) error
- func DialHijack(ctx context.Context, api Engine, url, proto string, meta map[string][]string) (net.Conn, error)
- func Dialer(api Engine) (func(context.Context) (net.Conn, error), error)
- func EncodeRegistryAuth(username, password, serverAddress string) string
- func EncodeRegistryIdentity(identityToken, serverAddress string) string
- func ErrorClass(err error) string
- func ErrorFromResponse(r ErrorResponse) error
- func ErrorFromWait(resp WaitResponse) error
- func ExecAction(ctx context.Context, cli *Client, compose *Compose, op string, ...) ([]byte, error)
- func ExecJSON(ctx context.Context, data []byte) ([]byte, error)
- func ExecTerminal(ctx context.Context, api Engine, containerID string, in *os.File, ...) (*terminal.Session, error)
- func Generate(ctx context.Context, api Composer, opts ...GenerateOption) (*composetypes.Project, error)
- func IsAborted(err error) bool
- func IsAlreadyExists(err error) bool
- func IsCanceled(err error) bool
- func IsConflict(err error) bool
- func IsConnectionFailed(err error) bool
- func IsDataLoss(err error) bool
- func IsDisabled(err error) bool
- func IsFailedPrecondition(err error) bool
- func IsIncompatible(err error) bool
- func IsInternal(err error) bool
- func IsInvalidArgument(err error) bool
- func IsInvalidProject(err error) bool
- func IsLoginFailed(err error) bool
- func IsLoginRequired(err error) bool
- func IsNotFound(err error) bool
- func IsNotImplemented(err error) bool
- func IsNotModified(err error) bool
- func IsOutOfRange(err error) bool
- func IsParsingFailed(err error) bool
- func IsPermissionDenied(err error) bool
- func IsRedirect(err error) bool
- func IsResourceExhausted(err error) bool
- func IsUnauthorized(err error) bool
- func IsUnavailable(err error) bool
- func IsUnknown(err error) bool
- func IsUnsupportedAttribute(err error) bool
- func IsUnsupportedFlag(err error) bool
- func IsWrongContextType(err error) bool
- func List(ctx context.Context, api Composer, opts ...ListOption) ([]composeapi.Stack, error)
- func PackPlugin(dir string) (io.ReadCloser, error)
- func PullImage(ctx context.Context, api Engine, ref string, opts ...EnginePullOption) error
- func PushImage(ctx context.Context, api Engine, ref string, opts ...EngineImagePushOption) error
- func ResizeExecTerminal(ctx context.Context, api Engine, execID string, sz terminal.Size) error
- func ResizeTerminal(ctx context.Context, api Engine, id string, sz terminal.Size) error
- func ServeSession(ctx context.Context, in io.Reader, out, errw io.Writer) int
- func StartExecTerminal(ctx context.Context, api Engine, containerID string, in *os.File, ...) error
- type APIVersionFromEnvOpt
- type APIVersionOpt
- type AcceptAllPermissionsOpt
- type AcceptPermissionsOpt
- type ActionOpt
- type AddFileOpt
- type AddIncludeOpt
- type AddJobOpt
- type AddModelOpt
- type AddNetworkOpt
- type AddOpts
- type AddSecretOpt
- type AddServiceOpt
- type AddVolumeOpt
- type AdditionalContextOpt
- type AdvertiseAddrOpt
- type AliasOpt
- type AllOpt
- type AllResourcesOpt
- type AppProtocolOpt
- type ApplicationOpt
- type ArgsEscapedOpt
- type ArgsOpt
- type AssumeYesOpt
- type AttachOpt
- type AttachOption
- type AttachStderrOpt
- type AttachStdinOpt
- type AttachStdoutOpt
- type AttachToOpt
- type AttachableOpt
- type AttestationsOpt
- type AuthorOpt
- type AutoRemoveOpt
- type AuxAddressOpt
- type AvailabilityOpt
- type BuildCacheOpt
- type BuildCachePruneOptions
- type BuildCachePruneResult
- type BuildCancelOptions
- type BuildCancelResult
- type BuildOpt
- type BuildOption
- type BuilderOpt
- type CAOpt
- type CPUsOpt
- type CacheFromOpt
- type CacheToOpt
- type CapAddOpt
- type CapDropOpt
- type CapabilitiesOpt
- type Capability
- type Cascade
- type CertOpt
- type ChangeOpt
- type CheckOpt
- type CheckpointCreateOptions
- type CheckpointCreateResult
- type CheckpointDirOpt
- type CheckpointListOptions
- type CheckpointListResult
- type CheckpointOpt
- type CheckpointRemoveOptions
- type CheckpointRemoveResult
- type Client
- func (c *Client) Close() error
- func (c *Client) Composer() Composer
- func (c *Client) Engine() Engine
- func (c *Client) Load(ctx context.Context, path string, opts ...LoadProjectOption) (*Loaded, error)
- func (c *Client) Run(ctx context.Context, opts ...ContainerOption) (Created, error)
- func (c *Client) Up(ctx context.Context, p *Compose, opts ...UpOption) error
- type ClientOption
- type ClusterSpecOpt
- type ClusterVolumeSpec
- type ColorOpt
- type CommandOpt
- type CommentOpt
- type CommitOption
- type CompatibilityOpt
- type Compose
- func (p *Compose) Attach(ctx context.Context, api Composer, service string, opts ...AttachOption) error
- func (p *Compose) Build(ctx context.Context, api Composer, opts ...ComposeBuildOption) error
- func (p *Compose) Commit(ctx context.Context, api Composer, service string, opts ...CommitOption) error
- func (p *Compose) Copy(ctx context.Context, api Composer, opts ...CopyOption) error
- func (p *Compose) Create(ctx context.Context, api Composer, opts ...ComposeCreateOption) error
- func (p *Compose) Down(ctx context.Context, api Composer, opts ...DownOption) error
- func (p *Compose) DryRunMode(ctx context.Context, api Composer, dry bool) (context.Context, error)
- func (p *Compose) Events(ctx context.Context, api Composer, opts ...EventsOption) error
- func (p *Compose) Exec(ctx context.Context, api Composer, service string, opts ...RunOption) (int, error)
- func (p *Compose) Export(ctx context.Context, api Composer, service string, opts ...ExportOption) error
- func (p *Compose) ExportYAML() ([]byte, error)
- func (p *Compose) Images(ctx context.Context, api Composer, opts ...ImagesOption) (map[string]composeapi.ImageSummary, error)
- func (p *Compose) Jobs() []*Job
- func (p *Compose) Kill(ctx context.Context, api Composer, opts ...KillOption) error
- func (p *Compose) Logs(ctx context.Context, api Composer, consumer composeapi.LogConsumer, ...) error
- func (p *Compose) MaxConcurrency(api Composer, n int) error
- func (p *Compose) Name() string
- func (p *Compose) Pause(ctx context.Context, api Composer, opts ...PauseOption) error
- func (p *Compose) Port(ctx context.Context, api Composer, service string, port uint16, ...) (string, int, error)
- func (p *Compose) Project() (*composetypes.Project, error)
- func (p *Compose) Ps(ctx context.Context, api Composer, opts ...PsOption) ([]composeapi.ContainerSummary, error)
- func (p *Compose) PublishOCI(ctx context.Context, api Composer, repository string, opts ...PublishOption) error
- func (p *Compose) Pull(ctx context.Context, api Composer, opts ...PullOption) error
- func (p *Compose) Push(ctx context.Context, api Composer, opts ...PushOption) error
- func (p *Compose) Remove(ctx context.Context, api Composer, opts ...RemoveOption) error
- func (p *Compose) Restart(ctx context.Context, api Composer, opts ...ComposeRestartOption) error
- func (p *Compose) Run(ctx context.Context, api Composer, service string, opts ...RunOption) (int, error)
- func (p *Compose) Scale(ctx context.Context, api Composer, opts ...ScaleOption) error
- func (p *Compose) Services() []*Service
- func (p *Compose) Start(ctx context.Context, api Composer, opts ...ComposeStartOption) error
- func (p *Compose) Stop(ctx context.Context, api Composer, opts ...ComposeStopOption) error
- func (p *Compose) Top(ctx context.Context, api Composer, services ...string) ([]composeapi.ContainerProcSummary, error)
- func (p *Compose) Unpause(ctx context.Context, api Composer, opts ...PauseOption) error
- func (p *Compose) Up(ctx context.Context, api Composer, opts ...UpOption) error
- func (p *Compose) Validate() error
- func (p *Compose) Viz(ctx context.Context, api Composer, opts ...VizOption) (string, error)
- func (p *Compose) VolumeList(ctx context.Context, api Composer, opts ...VolumesListOption) ([]composeapi.VolumesSummary, error)
- func (p *Compose) Wait(ctx context.Context, api Composer, opts ...WaitOption) (int64, error)
- func (p *Compose) Watch(ctx context.Context, api Composer, opts ...WatchOption) error
- func (p *Compose) WithFile(opts ...ComposeFileOption) *Compose
- func (p *Compose) WithJob(j *Job) *Compose
- func (p *Compose) WithModel(opts ...ComposeModelOption) *Compose
- func (p *Compose) WithName(name string) *Compose
- func (p *Compose) WithNetwork(opts ...ComposeNetOption) *Compose
- func (p *Compose) WithSecret(opts ...ComposeSecretOption) *Compose
- func (p *Compose) WithService(s *Service) *Compose
- func (p *Compose) WithVolume(opts ...ComposeVolOption) *Compose
- func (p *Compose) Write(act Export) error
- type ComposeBuildOption
- type ComposeCreateOption
- type ComposeFileOption
- type ComposeModelOption
- type ComposeNetOption
- type ComposeOption
- type ComposePortOption
- type ComposeRestartOption
- type ComposeSecretOption
- type ComposeStartOption
- type ComposeStopOption
- type ComposeVolOption
- type Composer
- type ComposerClientOption
- type ConditionOpt
- type ConfigCreateOptions
- type ConfigCreateResult
- type ConfigInspectOptions
- type ConfigInspectResult
- type ConfigListOptions
- type ConfigListResult
- type ConfigRemoveOptions
- type ConfigRemoveResult
- type ConfigSpec
- type ConfigUpdateOptions
- type ConfigUpdateResult
- type ConsoleSizeOpt
- type ConstraintOpt
- type ConsumeLogsOpt
- type Container
- func (c *Container) Apply(opts ...ContainerOption) error
- func (c *Container) AsService(opts ...ServiceOption) *Service
- func (c *Container) Create(ctx context.Context, api Engine, opts ...EngineCreateOption) (Created, error)
- func (c *Container) CreateName() (string, error)
- func (c *Container) EngineConfig() (*ContainerConfig, *HostConfig, *NetworkingConfig, error)
- func (c *Container) Image() string
- func (c *Container) Inspect(ctx context.Context, api Engine, id string, opts ...EngineInspectOption) (ContainerInspectResult, error)
- func (c *Container) Kill(ctx context.Context, api Engine, id string, opts ...KillOption) error
- func (c *Container) Logs(ctx context.Context, api Engine, id string, opts ...LogsOption) (ContainerLogsResult, error)
- func (c *Container) Name() string
- func (c *Container) Pause(ctx context.Context, api Engine, id string) error
- func (c *Container) Remove(ctx context.Context, api Engine, id string, opts ...RemoveOption) error
- func (c *Container) Restart(ctx context.Context, api Engine, id string, opts ...EngineStopOption) error
- func (c *Container) Start(ctx context.Context, api Engine, id string, opts ...EngineStartOption) error
- func (c *Container) Stop(ctx context.Context, api Engine, id string, opts ...EngineStopOption) error
- func (c *Container) Unpause(ctx context.Context, api Engine, id string) error
- func (c *Container) Validate() error
- func (c *Container) Wait(ctx context.Context, api Engine, id string, opts ...EngineWaitOption) ContainerWaitResult
- type ContainerAttachOptions
- type ContainerAttachResult
- type ContainerCommitOptions
- type ContainerCommitResult
- type ContainerConfig
- type ContainerCreateOptions
- type ContainerCreateResult
- type ContainerDiffOptions
- type ContainerDiffResult
- type ContainerExportOptions
- type ContainerExportResult
- type ContainerIDFileOpt
- type ContainerIDOpt
- type ContainerInspectOptions
- type ContainerInspectResult
- type ContainerKillOptions
- type ContainerKillResult
- type ContainerListOptions
- type ContainerListResult
- type ContainerLogsOptions
- type ContainerLogsResult
- type ContainerNameOpt
- type ContainerOption
- type ContainerPauseOptions
- type ContainerPauseResult
- type ContainerPortOpt
- type ContainerPruneOptions
- type ContainerPruneResult
- type ContainerRemoveOptions
- type ContainerRemoveResult
- type ContainerRenameOptions
- type ContainerRenameResult
- type ContainerResizeOptions
- type ContainerResizeResult
- type ContainerRestartOptions
- type ContainerRestartResult
- type ContainerSpec
- type ContainerStartOptions
- type ContainerStartResult
- type ContainerStatPathOptions
- type ContainerStatPathResult
- type ContainerStatsOptions
- type ContainerStatsResult
- type ContainerStopOptions
- type ContainerStopResult
- type ContainerTopOptions
- type ContainerTopResult
- type ContainerUnpauseOptions
- type ContainerUnpauseResult
- type ContainerUpdateOptions
- type ContainerUpdateResult
- type ContainerWaitOptions
- type ContainerWaitResult
- type ContainersOpt
- type ContentOpt
- type ContextSizeOpt
- type CopyFromContainerOptions
- type CopyFromContainerResult
- type CopyOption
- type CopyOpts
- type CopyPathOpt
- type CopyToContainerOptions
- type CopyToContainerResult
- type CopyUIDGIDOpt
- type CountOpt
- type CreateHostPathOpt
- type Created
- type CredentialConfigOpt
- type CredentialFileOpt
- type CredentialRegistryOpt
- type DataOpt
- type DataPathAddrOpt
- type DelayOpt
- type DependCondition
- type DependOption
- type DependsOnOpt
- type DeployOpt
- type DeployOption
- type DepsOpt
- type DetachKeysOpt
- type DetachOpt
- type DetailsOpt
- type DevelopOpt
- type DevelopOption
- type DeviceOpt
- type DeviceOption
- type DialContextOpt
- type DisabledOpt
- type DiscreteOpt
- type DiskUsageObject
- type DiskUsageOptions
- type DiskUsageResult
- type DistributionInspectOptions
- type DistributionInspectResult
- type DockerFile
- type Dockerfile
- func (d *Dockerfile) Add(src, dest string, opts ...AddOpts) *Dockerfile
- func (d *Dockerfile) Archive(contextDir string) (io.Reader, error)
- func (d *Dockerfile) Arg(name string, defaultValue ...string) *Dockerfile
- func (d *Dockerfile) Check(value string) *Dockerfile
- func (d *Dockerfile) Command(executable string, args ...string) *Dockerfile
- func (d *Dockerfile) CommandShell(executable string, args ...string) *Dockerfile
- func (d *Dockerfile) Comment(comment string) *Dockerfile
- func (d *Dockerfile) Copy(src, dest string, opts ...CopyOpts) *Dockerfile
- func (d *Dockerfile) Entrypoint(executable string, args ...string) *Dockerfile
- func (d *Dockerfile) EntrypointShell(executable string, args ...string) *Dockerfile
- func (d *Dockerfile) Env(key, value string) *Dockerfile
- func (d *Dockerfile) Escape(char string) *Dockerfile
- func (d *Dockerfile) Export(path string, mode os.FileMode) error
- func (d *Dockerfile) Expose(port string) *Dockerfile
- func (d *Dockerfile) Format(args ...any) *Dockerfile
- func (d *Dockerfile) From(image string, tag ...string) *Dockerfile
- func (d *Dockerfile) FromAs(image, alias string) *Dockerfile
- func (d *Dockerfile) FromAsPlatform(platform, image, alias string) *Dockerfile
- func (d *Dockerfile) FromPlatform(platform, image string, tag ...string) *Dockerfile
- func (d *Dockerfile) HealthCheck(opts ...HealthOption) *Dockerfile
- func (d *Dockerfile) HealthCheckNone() *Dockerfile
- func (d *Dockerfile) Label(key, value string) *Dockerfile
- func (d *Dockerfile) Onbuild(cmd string) *Dockerfile
- func (d *Dockerfile) Run(cmd string, opts ...RunOpts) *Dockerfile
- func (d *Dockerfile) RunArgs(args ...string) *Dockerfile
- func (d *Dockerfile) RunLayer(cmd string, opts ...RunOpts) *Dockerfile
- func (d *Dockerfile) Shell(executable string, args ...string) *Dockerfile
- func (d *Dockerfile) StopSignal(sig signal.Signal) *Dockerfile
- func (d *Dockerfile) String() string
- func (d *Dockerfile) Syntax(frontend string) *Dockerfile
- func (d *Dockerfile) User(user string) *Dockerfile
- func (d *Dockerfile) Validate() error
- func (d *Dockerfile) Volumes(volumes ...string) *Dockerfile
- func (d *Dockerfile) Workdir(path string) *Dockerfile
- type DockerfilePathOpt
- type DownOnExitOpt
- type DownOption
- type DriverOptKV
- type DriverValue
- type DryRunOpt
- type EnableIPv4Opt
- type EnableIPv6Opt
- type EndpointModeOpt
- type EndpointVarOpt
- type Engine
- type EngineAttachOption
- type EngineBuildCachePruneOption
- type EngineBuildOption
- type EngineCheckpointCreateOption
- type EngineCheckpointListOption
- type EngineCheckpointRemoveOption
- type EngineCommitOption
- type EngineConfigCreateOption
- type EngineConfigListOption
- type EngineConfigUpdateOption
- type EngineContainerListOption
- type EngineContainerPruneOption
- type EngineCopyFromOption
- type EngineCopyToOption
- type EngineCreateOption
- type EngineDiskUsageOption
- type EngineEventsOption
- type EngineExecAttachOption
- type EngineExecCreateOption
- type EngineExecResizeOption
- type EngineExecStartOption
- type EngineImageAttestOption
- type EngineImageHistoryOption
- type EngineImageImportOption
- type EngineImageInspectOption
- type EngineImageListOption
- type EngineImageLoadOption
- type EngineImagePruneOption
- type EngineImagePushOption
- type EngineImageRemoveOption
- type EngineImageSaveOption
- type EngineImageSearchOption
- type EngineImageTagOption
- type EngineInspectOption
- type EngineLoginOption
- type EngineNetworkConnectOption
- type EngineNetworkDisconnectOption
- type EngineNetworkInspectOption
- type EngineNetworkListOption
- type EngineNetworkOption
- type EngineNetworkPruneOption
- type EngineNodeListOption
- type EngineNodeRemoveOption
- type EngineNodeUpdateOption
- type EnginePingOption
- type EnginePluginCreateOption
- type EnginePluginDisableOption
- type EnginePluginEnableOption
- type EnginePluginInstallOption
- type EnginePluginListOption
- type EnginePluginPushOption
- type EnginePluginRemoveOption
- type EnginePluginSetOption
- type EnginePluginUpgradeOption
- type EnginePullOption
- type EngineRenameOption
- type EngineResizeOption
- type EngineSecretCreateOption
- type EngineSecretListOption
- type EngineSecretUpdateOption
- type EngineServiceCreateOption
- type EngineServiceListOption
- type EngineServiceLogsOption
- type EngineServiceUpdateOption
- type EngineStartOption
- type EngineStatPathOption
- type EngineStatsOption
- type EngineStopOption
- type EngineSwarmInitOption
- type EngineSwarmJoinOption
- type EngineSwarmLeaveOption
- type EngineSwarmUnlockOption
- type EngineSwarmUpdateOption
- type EngineTaskListOption
- type EngineTaskLogsOption
- type EngineTopOption
- type EngineUpdateOption
- type EngineVolumeListOption
- type EngineVolumeOption
- type EngineVolumePruneOption
- type EngineVolumeRemoveOption
- type EngineVolumeUpdateOption
- type EngineWaitOption
- type EntitlementOpt
- type EntrypointOpt
- type EnvFileOpt
- type EnvFileOption
- type EnvOpt
- type Error
- type ErrorResponse
- type Event
- type EventConsumerOpt
- type EventsListOptions
- type EventsOption
- type EventsResult
- type ExecAttachOptions
- type ExecAttachResult
- type ExecCreateOptions
- type ExecCreateResult
- type ExecInspectOptions
- type ExecInspectResult
- type ExecResizeOptions
- type ExecResizeResult
- type ExecStartOptions
- type ExecStartResult
- type ExitError
- type ExitFromOpt
- type Export
- type ExportOption
- type ExposeOpt
- type ExtendsFileOpt
- type ExtendsOpt
- type ExternalLinkOpt
- type ExternalOpt
- type ExtraHostOpt
- type FailureActionOpt
- type FileConfigOpt
- type FileConfigOption
- type FileModeOpt
- type FileOpt
- type FilterOpt
- type Filters
- type FollowLinkOpt
- type FollowOpt
- type ForceNegotiateOpt
- type ForceNewClusterOpt
- type ForceOpt
- type FormatOpt
- type FromContainerOpt
- type FromEnvOpt
- type FromFileOpt
- type GIDOpt
- type GPUOpt
- type GPUOption
- type GatewayOpt
- type GatewayPriorityOpt
- type GenerateOption
- type Grouped
- type HTTPClientOpt
- type HTTPHeaderOpt
- type HTTPRequestHookOpt
- type HTTPResponseHookOpt
- type HardOpt
- type HealthOpt
- type HealthOption
- type HijackedResponse
- type HookOption
- type HostConfig
- type HostFromEnvOpt
- type HostIPOpt
- type HostOpt
- type HostPortOpt
- type IPAMDriverOpt
- type IPAMOptKV
- type IPRangeOpt
- type IPv4Opt
- type IPv6Opt
- type IdentityTokenOpt
- type IgnoreBuildableOpt
- type IgnoreFailuresOpt
- type IgnoreOpt
- type IgnoreOrphansOpt
- type ImageAttestationsOption
- type ImageAttestationsResult
- type ImageBuildOptions
- type ImageBuildResult
- type ImageHistoryOption
- type ImageHistoryResult
- type ImageImportOptions
- type ImageImportResult
- type ImageImportSource
- type ImageInspectOption
- type ImageInspectResult
- type ImageListOptions
- type ImageListResult
- type ImageLoadOption
- type ImageLoadResult
- type ImageMandatoryOpt
- type ImageOpt
- type ImagePlatformOpt
- type ImagePruneOptions
- type ImagePruneResult
- type ImagePullOptions
- type ImagePullResponse
- type ImagePushOptions
- type ImagePushResponse
- type ImageRemoveOptions
- type ImageRemoveResult
- type ImageSaveOption
- type ImageSaveResult
- type ImageSearchOptions
- type ImageSearchResult
- type ImageTagOptions
- type ImageTagResult
- type ImagesOpt
- type ImagesOption
- type ImportOption
- type IncludeImageOpt
- type IncludeNetworksOpt
- type IncludeOpt
- type IncludeOption
- type IncludePortsOpt
- type IncludeSizeOpt
- type IndentOpt
- type IndexOpt
- type InfoOptions
- type InheritOpt
- type InitialSyncOpt
- type InsecureRegistryOpt
- type InteractiveOpt
- type InterfaceNameOpt
- type InternalOpt
- type IntervalOpt
- type InvalidTemplateError
- type IsolationOpt
- type JSONError
- type Job
- type JobOption
- type JoinTokenOpt
- type KeyOpt
- type KillOption
- type KindOpt
- type LabelFileOpt
- type LabelOpt
- type LimitOpt
- type LinkLocalOpt
- type LinksOpt
- type ListOption
- type ListenAddrOpt
- type LoadListener
- type LoadProjectOption
- type Loaded
- type LogConsumer
- type LogEvent
- type LogKind
- type LogOpt
- type LogOption
- type LogStatus
- type Logger
- func (l *Logger) Context(ctx context.Context) context.Context
- func (l *Logger) Done(operation string, failed bool)
- func (l *Logger) Emit(e LogEvent)
- func (l *Logger) Err(containerName, message string)
- func (l *Logger) Log(containerName, message string)
- func (l *Logger) On(events ...composeapi.Resource)
- func (l *Logger) Start(_ context.Context, operation string)
- func (l *Logger) Status(container, msg string)
- type LoggerOption
- type LoggingOpt
- type LogsOption
- type MacAddressOpt
- type ManifestsOpt
- type MaskedPathOpt
- type MaxConcurrencyOpt
- type MaxFailureRatioOpt
- type MaxReplicasOpt
- type MaxRetriesOpt
- type MemoryOpt
- type MissingRequiredError
- type ModeOpt
- type ModelOpt
- type ModelOption
- type ModelVarOpt
- type MonitorOpt
- type NameOpt
- type NavigationMenuOpt
- type NegotiateAPIVersionOpt
- type NetworkConnectOptions
- type NetworkConnectResult
- type NetworkCreateOptions
- type NetworkCreateResult
- type NetworkDisconnectOptions
- type NetworkDisconnectResult
- type NetworkInspectOptions
- type NetworkInspectResult
- type NetworkListOptions
- type NetworkListResult
- type NetworkModeOpt
- type NetworkOpt
- type NetworkOption
- type NetworkPruneOptions
- type NetworkPruneResult
- type NetworkRemoveOptions
- type NetworkRemoveResult
- type NetworkingConfig
- type NoCacheFilterOpt
- type NoCacheOpt
- type NoCopyOpt
- type NoDepsOpt
- type NoStdinOpt
- type Node
- type NodeAvailability
- type NodeInspectOptions
- type NodeInspectResult
- type NodeListOptions
- type NodeListResult
- type NodeRemoveOptions
- type NodeRemoveResult
- type NodeRole
- type NodeSpec
- type NodeUpdateOptions
- type NodeUpdateResult
- type OCIOpt
- type OCIOptions
- type OCIVersion
- type OfflineOpt
- type OnBuildOpt
- type OnExitOpt
- type OnLoadOpt
- type OnUnsupportedOpt
- type OrderOpt
- type OutputFileOpt
- type OutputStreamOpt
- type ParallelismOpt
- type PasswordOpt
- type PathOpt
- type PauseOpt
- type PauseOption
- type PerReplicaOpt
- type PermsOpt
- type PidsLimitOpt
- type PingOptions
- type PingResult
- type PlacementOpt
- type PlacementOption
- type Plan
- type PlatformOpt
- type Plugin
- type PluginConfig
- type PluginCreateOptions
- type PluginCreateResult
- type PluginDisableOptions
- type PluginDisableResult
- type PluginEnableOptions
- type PluginEnableResult
- type PluginInspectOptions
- type PluginInspectResult
- type PluginInstallOptions
- type PluginInstallResult
- type PluginListOptions
- type PluginListResult
- type PluginPrivilege
- type PluginPrivileges
- type PluginPushOptions
- type PluginPushResult
- type PluginRemoveOptions
- type PluginRemoveResult
- type PluginSetOptions
- type PluginSetResult
- type PluginSettings
- type PluginUpgradeOptions
- type PluginUpgradeResult
- type PolicyOpt
- type PortOption
- type PostStartOpt
- type PreStartOpt
- type PreStopOpt
- type PredicateTypesOpt
- type PrintOpt
- type PriorityOpt
- type PrivilegeOpt
- type PrivilegedOpt
- type ProfileOpt
- type ProgressOpt
- type Project
- type ProjectDirectoryOpt
- type ProjectFnOpt
- func ConfigFileEnv() ProjectFnOpt
- func Consistency(v bool) ProjectFnOpt
- func DefaultConfigPath() ProjectFnOpt
- func DiscardEnvFile() ProjectFnOpt
- func DotEnv() ProjectFnOpt
- func EnvironmentResolution(v bool) ProjectFnOpt
- func Interpolation(v bool) ProjectFnOpt
- func LabelsResolution(v bool) ProjectFnOpt
- func Normalization(v bool) ProjectFnOpt
- func OsEnv() ProjectFnOpt
- func ProjectOption(fn ProjectOptionsFn) ProjectFnOpt
- func ResolvedPaths(v bool) ProjectFnOpt
- type ProjectLoadOptions
- type ProjectOptionsFn
- type PropagationOpt
- type Proto
- type ProtocolOpt
- type ProvenanceOpt
- type ProviderOpt
- type ProviderOptionOpt
- type ProxyOpt
- type PruneOpt
- type PsOption
- type PublishAllOpt
- type PublishOpt
- type PublishOption
- type PublishedOpt
- type PullMode
- type PullOpt
- type PullOption
- type PullPolicyOpt
- type PullRefreshAfterOpt
- type PushOpt
- type PushOption
- type QueryRegistryOpt
- type QuietOpt
- type RawResponseOpt
- type ReadOnlyOpt
- type ReadonlyPathOpt
- type RecreateDependenciesOpt
- type RecreateOpt
- type RecursiveOpt
- type ReferenceOpt
- type RegistryAuthFromOpt
- type RegistryAuthOpt
- type RegistryAuthSource
- type RegistryLoginOptions
- type RegistryLoginResult
- type RegistryTokenOpt
- type RemoteAddrsOpt
- type RemoveImagesOpt
- type RemoveOption
- type RemoveOrphansOpt
- type ReplicasOpt
- type RequiredOpt
- type ReserveOpt
- type ReserveOption
- type ResolveDigestsOpt
- type RestartOnFailureOpt
- type RestartOpt
- type RestartOption
- type RestartPolicy
- type RetriesOpt
- type RoleOpt
- type RunOption
- type RunOpts
- type RuntimeFlagOpt
- type SBOMOpt
- type SELinuxOpt
- type SSHOpt
- type ScaleOption
- type SchemeOpt
- type SecretCreateOptions
- type SecretCreateResult
- type SecretInspectOptions
- type SecretInspectResult
- type SecretListOptions
- type SecretListResult
- type SecretOpt
- type SecretOption
- type SecretRemoveOptions
- type SecretRemoveResult
- type SecretSpec
- type SecretUpdateOptions
- type SecretUpdateResult
- type ServerAddressOpt
- type ServerVersionOptions
- type ServerVersionResult
- type Service
- type ServiceCreateOptions
- type ServiceCreateResult
- type ServiceInspectOptions
- type ServiceInspectResult
- type ServiceListOptions
- type ServiceListResult
- type ServiceLogsOptions
- type ServiceLogsResult
- type ServiceNameOpt
- type ServiceOption
- type ServiceRemoveOptions
- type ServiceRemoveResult
- type ServiceRollbackOpt
- type ServiceSpec
- type ServiceUpdateOptions
- type ServiceUpdateResult
- type ServicesOpt
- type Session
- type ShellOpt
- type SinceOpt
- type SizeOpt
- type SoftOpt
- type SourceOpt
- type SpecOpt
- func Annotation(key, value string) SpecOpt
- func BlkioReadBps(path string, rate uint64) SpecOpt
- func BlkioReadIOps(path string, rate uint64) SpecOpt
- func BlkioWeight(n uint16) SpecOpt
- func BlkioWeightDevice(path string, weight uint16) SpecOpt
- func BlkioWriteBps(path string, rate uint64) SpecOpt
- func BlkioWriteIOps(path string, rate uint64) SpecOpt
- func CPUCount(n int64) SpecOpt
- func CPUPercent(n int64) SpecOpt
- func CPUPeriod(n int64) SpecOpt
- func CPUQuota(n int64) SpecOpt
- func CPURealtimePeriod(n int64) SpecOpt
- func CPURealtimeRuntime(n int64) SpecOpt
- func CPUSet(set string) SpecOpt
- func CPUSetMems(set string) SpecOpt
- func CPUShares(n int64) SpecOpt
- func Cgroup(specName string) SpecOpt
- func CgroupNS(mode cgroupns.Mode) SpecOpt
- func CgroupParent(parent string) SpecOpt
- func DNS(addr string) SpecOpt
- func DNSOption(opt string) SpecOpt
- func DNSSearch(d string) SpecOpt
- func DeviceCgroupRule(rule string) SpecOpt
- func DomainName(d string) SpecOpt
- func GroupAdd(g string) SpecOpt
- func Hostname(host string) SpecOpt
- func IOMaximumBandwidth(n uint64) SpecOpt
- func IOMaximumIOps(n uint64) SpecOpt
- func IPC(mode ipc.Mode) SpecOpt
- func Init(v bool) SpecOpt
- func Link(name string) SpecOpt
- func MemoryReservation(bytes int64) SpecOpt
- func MemorySwap(bytes int64) SpecOpt
- func MemorySwappiness(n int64) SpecOpt
- func NetworkDisabled(v bool) SpecOpt
- func OomKillDisable(v bool) SpecOpt
- func OomScoreAdj(n int) SpecOpt
- func PID(mode pidns.Mode) SpecOpt
- func Runtime(name string) SpecOpt
- func SecurityOpt(opt string) SpecOpt
- func ShmSize(bytes int64) SpecOpt
- func StopTimeout(d time.Duration) SpecOpt
- func StorageOpt(key, value string) SpecOpt
- func Sysctl(key, value string) SpecOpt
- func UTS(mode uts.Mode) SpecOpt
- func Umask(mode uint32) SpecOpt
- func UserNS(mode userns.Mode) SpecOpt
- func VolumeDriver(d string) SpecOpt
- func VolumesFrom(name string) SpecOpt
- type SpreadOpt
- type StartIntervalOpt
- type StartPeriodOpt
- type StatementOpt
- type StdinOnceOpt
- type StopOpt
- type StopSignalOpt
- type StreamOpt
- type SubPathOpt
- type SubnetOpt
- type SwarmGetUnlockKeyResult
- type SwarmInitOptions
- type SwarmInitResult
- type SwarmInspectOptions
- type SwarmInspectResult
- type SwarmJoinOptions
- type SwarmJoinResult
- type SwarmLeaveOptions
- type SwarmLeaveResult
- type SwarmUnlockOptions
- type SwarmUnlockResult
- type SwarmUpdateOptions
- type SwarmUpdateResult
- type SwarmVersion
- type SystemInfoResult
- type TLSFromEnvOpt
- type TLSOpt
- type TLSOption
- type TagOpt
- type TailOpt
- type TarOpt
- type TargetOpt
- type TaskInspectOptions
- type TaskInspectResult
- type TaskListOptions
- type TaskListResult
- type TaskLogsOptions
- type TaskLogsResult
- type TaskSpec
- type TemplateDriverOpt
- type TestOpt
- type TimeoutOpt
- type TimestampsOpt
- type TmpfsMountOpt
- type TraceOptionsOpt
- type TraceProviderOpt
- type TtyOpt
- type UIDOpt
- type UlimitOpt
- type UlimitOption
- type UnsupportedAttribute
- type UntilOpt
- type UpOption
- type UpdateOpt
- type UpdateOption
- type UsageOpt
- type UseAPISocketOpt
- type UseAliasesOpt
- type UseServiceNameAliasOpt
- type UserAgentOpt
- type UserOpt
- type UsernameOpt
- type VerboseOpt
- type VersionIndexOpt
- type VizOption
- type VolumeCreateOptions
- type VolumeCreateResult
- type VolumeInspectOptions
- type VolumeInspectResult
- type VolumeKind
- type VolumeListOptions
- type VolumeListResult
- type VolumeOpt
- type VolumeOption
- type VolumePruneOptions
- type VolumePruneResult
- type VolumeRemoveOptions
- type VolumeRemoveResult
- type VolumeUpdateOptions
- type VolumeUpdateResult
- type VolumesListOption
- type VolumesOpt
- type WaitCondition
- type WaitExitError
- type WaitForOpt
- type WaitOpt
- type WaitOption
- type WaitResponse
- type WatchAction
- type WatchChangesOpt
- type WatchFilesOpt
- type WatchOption
- type WatchTriggerOption
- type WindowOpt
- type WithEnvironmentOpt
- type WorkingDirOpt
Examples ¶
Constants ¶
Network modes for NetworkMode. The daemon address setter is Host; the host network namespace is NetworkHost.
const ( IPCPrivate = ipc.Private IPCHost = ipc.Host )
IPC modes for IPC.
const ( PortIngress = portmode.Ingress PortHost = portmode.Host )
Port publish modes for Mode inside Publish.
const ( Replicated = svcmode.Replicated Global = svcmode.Global )
Deploy modes for Mode inside Deploy.
const ( SIGTERM = signal.SIGTERM SIGKILL = signal.SIGKILL )
Common stop/kill signals for StopSignal.
const ( NoRestart = restartpkg.No OnFailure = restartpkg.OnFailure Always = restartpkg.Always UnlessStopped = restartpkg.UnlessStopped )
const ( Started = dependpkg.Started Healthy = dependpkg.Healthy CompletedSuccessfully = dependpkg.CompletedSuccessfully )
const ( Bind = vol.Bind NamedVolume = vol.Volume Tmpfs = vol.Tmpfs NamedPipe = vol.Pipe Cluster = vol.Cluster ImageVolume = vol.Image )
const ( NotRunning = wait.NotRunning NextExit = wait.NextExit Removed = wait.Removed )
const ( PullAlways = pull.Always PullNever = pull.Never PullMissing = pull.Missing PullIfNotPresent = pull.IfNotPresent PullBuild = pull.Build PullRefresh = pull.Refresh PullDaily = pull.Daily PullWeekly = pull.Weekly )
const ( Sync = watch.Sync Rebuild = watch.Rebuild RestartSync = watch.SyncRestart ExecSync = watch.SyncExec WatchRestart = watch.Restart )
const ( CascadeIgnore = cascade.Ignore CascadeStop = cascade.Stop CascadeFail = cascade.Fail )
const ( OCI1_0 = oci.V1_0 OCI1_1 = oci.V1_1 )
const ( UsageContainer = df.Container UsageImage = df.Image UsageVolume = df.Volume UsageBuildCache = df.BuildCache )
const ALL = cap.ALL
const EndpointVIP = endpoint.VIP
EndpointVIP is deploy.endpoint_mode vip for EndpointMode.
const JSONFile = logdrv.JSONFile
Variables ¶
var ( ErrUnknown = cerrdefs.ErrUnknown ErrInvalidArgument = cerrdefs.ErrInvalidArgument ErrNotFound = cerrdefs.ErrNotFound ErrAlreadyExists = cerrdefs.ErrAlreadyExists ErrPermissionDenied = cerrdefs.ErrPermissionDenied ErrResourceExhausted = cerrdefs.ErrResourceExhausted ErrFailedPrecondition = cerrdefs.ErrFailedPrecondition ErrConflict = cerrdefs.ErrConflict ErrNotModified = cerrdefs.ErrNotModified ErrAborted = cerrdefs.ErrAborted ErrOutOfRange = cerrdefs.ErrOutOfRange ErrNotImplemented = cerrdefs.ErrNotImplemented ErrInternal = cerrdefs.ErrInternal ErrDataLoss = cerrdefs.ErrDataLoss ErrRedirect = engineclient.ErrRedirect )
Engine errdefs sentinels. errors.Is matches both kit wrappers and raw Engine client errors.
var ( ErrCanceled = composeapi.ErrCanceled ErrUnsupportedFlag = composeapi.ErrUnsupportedFlag ErrParsingFailed = composeapi.ErrParsingFailed // Compose v5 dropped these sentinels; keep them so errors.Is still works // for callers and for wrapped registry-login failures. ErrLoginFailed = errors.New("login failed") ErrLoginRequired = errors.New("login required") ErrWrongContextType = errors.New("wrong context type") ErrInvalidProject = composeerrdefs.ErrInvalid ErrUnsupportedAttribute = composeerrdefs.ErrUnsupported ErrIncompatible = composeerrdefs.ErrIncompatible ErrDisabled = composeerrdefs.ErrDisabled )
Compose SDK sentinels that have no Engine errdefs equivalent.
var ExecFlow func(ctx context.Context, cli *Client, flow json.RawMessage) ([]byte, error)
ExecFlow runs a taskflow document on an already-dialed client. Package taskflow registers it. A nil hook means that package is not linked.
var ValidateFlow func(flow json.RawMessage) error
ValidateFlow checks a taskflow document without dialing. Package taskflow registers it. A nil hook means that package is not linked.
Functions ¶
func AttachTerminal ¶ added in v0.8.1
func AttachTerminal(ctx context.Context, api Engine, id string, in *os.File, out io.Writer, opts ...EngineAttachOption) (*terminal.Session, error)
AttachTerminal hijacks a running container and returns a terminal.Session bound to in and out. Call terminal.Session.Start to copy I/O; pass a resize func that calls ResizeContainer with ConsoleSize when in is a real terminal. With no attach options, Stream, AttachStdin, AttachStdout, and AttachStderr are enabled.
func BuildImage ¶ added in v0.8.1
func BuildImage(ctx context.Context, api Engine, opts ...EngineBuildOption) error
BuildImage builds an image through Engine. Supply a Dockerfile, Source context directory, and/or Tar archive. The Engine call returns a progress stream. This function reads that stream to the end, so the build finishes here and the body is not a result.
func ClientVersion ¶ added in v0.8.1
ClientVersion returns the API version this Engine client is using.
func CopyMultiplexed ¶ added in v0.8.1
CopyMultiplexed splits a Docker attach or logs stream. Without a TTY, the Engine prefixes each frame with a stream id. Stdout frames are written to out and stderr frames to errw. out and errw may be the same writer. src is read until EOF. The count is the total number of payload bytes written.
func DaemonHost ¶ added in v0.8.1
DaemonHost returns the Engine daemon host the client is connected to.
func DecodeAction ¶ added in v0.8.1
DecodeAction checks a plan option bag for op. Unknown ops are not an error here; execution reports those.
func DialHijack ¶ added in v0.8.1
func DialHijack(ctx context.Context, api Engine, url, proto string, meta map[string][]string) (net.Conn, error)
DialHijack opens a hijacked connection to the Engine daemon.
func EncodeRegistryAuth ¶ added in v0.8.1
EncodeRegistryAuth returns the X-Registry-Auth value for RegistryAuth (base64url JSON username/password/serveraddress).
func EncodeRegistryIdentity ¶ added in v0.8.1
EncodeRegistryIdentity returns the X-Registry-Auth value for RegistryAuth from a login identity token.
func ErrorClass ¶ added in v0.8.1
ErrorClass is the stable class string for a kit error. Callers branch on this value. The message stays redacted.
func ErrorFromResponse ¶ added in v0.8.1
func ErrorFromResponse(r ErrorResponse) error
ErrorFromResponse wraps an Engine ErrorResponse message.
func ErrorFromWait ¶ added in v0.8.1
func ErrorFromWait(resp WaitResponse) error
ErrorFromWait wraps a WaitResponse error payload as ExitError.
func ExecAction ¶ added in v0.8.1
func ExecAction(ctx context.Context, cli *Client, compose *Compose, op string, options map[string]any, fields map[string]any) ([]byte, error)
ExecAction runs one plan op on cli. compose is required for compose ops. fields supplies positional arguments such as service, id, path, ref, and port.
func ExecJSON ¶ added in v0.8.1
ExecJSON loads a plan and runs it, returning the last action's JSON result.
func ExecTerminal ¶ added in v0.8.1
func ExecTerminal(ctx context.Context, api Engine, containerID string, in *os.File, out io.Writer, opts ...EngineExecCreateOption) (*terminal.Session, error)
ExecTerminal creates an exec process, hijacks it, and returns a terminal.Session bound to in and out. Tty, AttachStdin, AttachStdout, and AttachStderr default on; pass Command for the remote argv. Call terminal.Session.Start with a resize func that calls ResizeExec when in is a real terminal.
func Generate ¶
func Generate(ctx context.Context, api Composer, opts ...GenerateOption) (*composetypes.Project, error)
Generate builds a Compose project from existing Engine containers.
func IsAlreadyExists ¶ added in v0.8.1
func IsCanceled ¶ added in v0.8.1
func IsConflict ¶ added in v0.8.1
func IsConnectionFailed ¶ added in v0.8.1
func IsDataLoss ¶ added in v0.8.1
func IsDisabled ¶ added in v0.8.1
func IsFailedPrecondition ¶ added in v0.8.1
func IsIncompatible ¶ added in v0.8.1
func IsInternal ¶ added in v0.8.1
func IsInvalidArgument ¶ added in v0.8.1
func IsInvalidProject ¶ added in v0.8.1
func IsLoginFailed ¶ added in v0.8.1
func IsLoginRequired ¶ added in v0.8.1
func IsNotFound ¶ added in v0.8.1
func IsNotImplemented ¶ added in v0.8.1
func IsNotModified ¶ added in v0.8.1
func IsOutOfRange ¶ added in v0.8.1
func IsParsingFailed ¶ added in v0.8.1
func IsPermissionDenied ¶ added in v0.8.1
func IsRedirect ¶ added in v0.8.1
func IsResourceExhausted ¶ added in v0.8.1
func IsUnauthorized ¶ added in v0.8.1
func IsUnavailable ¶ added in v0.8.1
func IsUnsupportedAttribute ¶ added in v0.8.1
func IsUnsupportedFlag ¶ added in v0.8.1
func IsWrongContextType ¶ added in v0.8.1
func List ¶ added in v0.8.1
func List(ctx context.Context, api Composer, opts ...ListOption) ([]composeapi.Stack, error)
List lists Compose stacks.
func PackPlugin ¶ added in v0.8.1
func PackPlugin(dir string) (io.ReadCloser, error)
PackPlugin tars a plugin data directory for CreatePlugin.
dir must contain config.json and a rootfs/ directory, matching https://docs.docker.com/engine/extend/#developing-a-plugin.
func PullImage ¶ added in v0.8.1
PullImage pulls an image through Engine. The Engine call returns a progress stream. This function reads that stream to the end, so the pull finishes here and the body is not a result.
func PushImage ¶ added in v0.8.1
PushImage pushes an image through Engine. The Engine call returns a progress stream. This function reads that stream to the end, so the push finishes here and the body is not a result.
func ResizeExecTerminal ¶ added in v0.8.1
ResizeExecTerminal reports a window size to a running exec TTY.
func ResizeTerminal ¶ added in v0.8.1
ResizeTerminal reports a window size to a running container TTY.
func ServeSession ¶ added in v0.8.1
ServeSession reads NDJSON calls from in and writes result, error, and event frames to out. Diagnostics go to errw. The process stays up until in reaches EOF or ctx is canceled.
func StartExecTerminal ¶ added in v0.8.1
func StartExecTerminal(ctx context.Context, api Engine, containerID string, in *os.File, out io.Writer, opts ...EngineExecCreateOption) error
StartExecTerminal creates an exec, hijacks it, and copies in and out until the remote process exits. When in is a terminal, the session is raw and window changes call ResizeExecTerminal. A pipe skips raw mode and resize, so a test can drive the same path without a keyboard.
Types ¶
type APIVersionFromEnvOpt ¶ added in v0.8.1
type APIVersionFromEnvOpt struct{}
APIVersionFromEnvOpt is the value returned by APIVersionFromEnv. It implements ClientOption and ComposerClientOption.
func APIVersionFromEnv ¶ added in v0.8.1
func APIVersionFromEnv() APIVersionFromEnvOpt
APIVersionFromEnv pins the Engine API version from DOCKER_API_VERSION.
type APIVersionOpt ¶ added in v0.8.1
type APIVersionOpt struct {
// contains filtered or unexported fields
}
APIVersionOpt is the value returned by APIVersion. It implements ClientOption and ComposerClientOption.
func APIVersion ¶ added in v0.8.1
func APIVersion(v string) APIVersionOpt
APIVersion pins the Engine API version and disables negotiation.
type AcceptAllPermissionsOpt ¶ added in v0.8.1
type AcceptAllPermissionsOpt struct {
// contains filtered or unexported fields
}
AcceptAllPermissionsOpt is the value returned by AcceptAllPermissions. It implements EnginePluginInstallOption and EnginePluginUpgradeOption.
func AcceptAllPermissions ¶ added in v0.8.1
func AcceptAllPermissions(v bool) AcceptAllPermissionsOpt
AcceptAllPermissions skips the privilege prompt on InstallPlugin and UpgradePlugin.
type AcceptPermissionsOpt ¶ added in v0.8.1
type AcceptPermissionsOpt struct {
// contains filtered or unexported fields
}
AcceptPermissionsOpt is the value returned by AcceptPermissions. It implements EnginePluginInstallOption and EnginePluginUpgradeOption.
func AcceptPermissions ¶ added in v0.8.1
func AcceptPermissions(fn func(context.Context, PluginPrivileges) (bool, error)) AcceptPermissionsOpt
AcceptPermissions supplies a privilege-prompt callback for InstallPlugin and UpgradePlugin.
type ActionOpt ¶ added in v0.8.1
type ActionOpt struct {
// contains filtered or unexported fields
}
ActionOpt is the value returned by Action. It implements WatchTriggerOption.
func Action ¶ added in v0.8.1
func Action(a WatchAction) ActionOpt
Action sets a develop.watch action inside WatchFiles.
type AddFileOpt ¶ added in v0.8.1
type AddFileOpt struct {
// contains filtered or unexported fields
}
AddFileOpt is the value returned by AddFile. It implements ComposeOption.
func AddFile ¶ added in v0.8.1
func AddFile(opts ...ComposeFileOption) AddFileOpt
AddFile defines a project-level Compose config object.
type AddIncludeOpt ¶ added in v0.8.1
type AddIncludeOpt struct {
// contains filtered or unexported fields
}
AddIncludeOpt is the value returned by AddInclude. It implements ComposeOption.
func AddInclude ¶ added in v0.8.1
func AddInclude(opts ...IncludeOption) AddIncludeOpt
AddInclude adds a top-level Compose include entry.
type AddJobOpt ¶ added in v0.8.1
type AddJobOpt struct {
// contains filtered or unexported fields
}
AddJobOpt is the value returned by AddJob. It implements ComposeOption.
type AddModelOpt ¶ added in v0.8.1
type AddModelOpt struct {
// contains filtered or unexported fields
}
AddModelOpt is the value returned by AddModel. It implements ComposeOption.
func AddModel ¶ added in v0.8.1
func AddModel(opts ...ComposeModelOption) AddModelOpt
AddModel defines a project-level Compose model.
type AddNetworkOpt ¶ added in v0.8.1
type AddNetworkOpt struct {
// contains filtered or unexported fields
}
AddNetworkOpt is the value returned by AddNetwork. It implements ComposeOption.
func AddNetwork ¶ added in v0.8.1
func AddNetwork(opts ...ComposeNetOption) AddNetworkOpt
AddNetwork defines a project-level network.
type AddOpts ¶
type AddOpts struct {
Chown string
Chmod string
Checksum string
KeepGitDir bool
Link bool
Exclude []string
}
AddOpts are optional flags on a Dockerfile ADD instruction.
type AddSecretOpt ¶ added in v0.8.1
type AddSecretOpt struct {
// contains filtered or unexported fields
}
AddSecretOpt is the value returned by AddSecret. It implements ComposeOption.
func AddSecret ¶ added in v0.8.1
func AddSecret(opts ...ComposeSecretOption) AddSecretOpt
AddSecret defines a project-level secret.
type AddServiceOpt ¶ added in v0.8.1
type AddServiceOpt struct {
// contains filtered or unexported fields
}
AddServiceOpt is the value returned by AddService. It implements ComposeOption.
func AddService ¶ added in v0.8.1
func AddService(opts ...ServiceOption) AddServiceOpt
AddService adds a nested service via the option vocabulary so [logic.Group] can carry one. Callers building a file should use Compose.WithService.
type AddVolumeOpt ¶ added in v0.8.1
type AddVolumeOpt struct {
// contains filtered or unexported fields
}
AddVolumeOpt is the value returned by AddVolume. It implements ComposeOption.
func AddVolume ¶ added in v0.8.1
func AddVolume(opts ...ComposeVolOption) AddVolumeOpt
AddVolume defines a project-level named volume.
type AdditionalContextOpt ¶ added in v0.8.1
type AdditionalContextOpt struct {
// contains filtered or unexported fields
}
AdditionalContextOpt is the value returned by AdditionalContext. It implements BuildOption.
func AdditionalContext ¶ added in v0.8.1
func AdditionalContext(name, value string) AdditionalContextOpt
AdditionalContext adds a named additional build context inside Build.
type AdvertiseAddrOpt ¶ added in v0.8.1
type AdvertiseAddrOpt struct {
// contains filtered or unexported fields
}
AdvertiseAddrOpt is the value returned by AdvertiseAddr. It implements EngineSwarmInitOption and EngineSwarmJoinOption.
func AdvertiseAddr ¶ added in v0.8.1
func AdvertiseAddr(addr string) AdvertiseAddrOpt
AdvertiseAddr sets the address swarm advertises to other nodes (for example 10.0.0.11:2377).
type AliasOpt ¶ added in v0.8.1
type AliasOpt struct {
// contains filtered or unexported fields
}
AliasOpt is the value returned by Alias. It implements NetworkOption.
type AllOpt ¶ added in v0.8.1
type AllOpt struct {
// contains filtered or unexported fields
}
AllOpt is the value returned by All. It implements CopyOption, EngineBuildCachePruneOption, EngineContainerListOption, EngineImageListOption, EngineImagePushOption, EnginePullOption, EngineVolumePruneOption, KillOption, ListOption, and PsOption.
func All ¶ added in v0.8.1
All includes stopped containers, every image tag, or every prune candidate. LoadProject unused resources use AllResources.
type AllResourcesOpt ¶ added in v0.8.1
type AllResourcesOpt struct {
// contains filtered or unexported fields
}
AllResourcesOpt is the value returned by AllResources. It implements LoadProjectOption.
func AllResources ¶ added in v0.8.1
func AllResources(v bool) AllResourcesOpt
AllResources includes unused Compose resources on LoadProject.
type AppProtocolOpt ¶ added in v0.8.1
type AppProtocolOpt struct {
// contains filtered or unexported fields
}
AppProtocolOpt is the value returned by AppProtocol. It implements PortOption.
func AppProtocol ¶ added in v0.8.1
func AppProtocol(s string) AppProtocolOpt
AppProtocol sets Compose ports.app_protocol inside Publish.
type ApplicationOpt ¶ added in v0.8.1
type ApplicationOpt struct {
// contains filtered or unexported fields
}
ApplicationOpt is the value returned by Application. It implements PublishOption.
func Application ¶ added in v0.8.1
func Application(v bool) ApplicationOpt
Application publishes as an application artifact.
type ArgsEscapedOpt ¶ added in v0.8.1
type ArgsEscapedOpt struct {
// contains filtered or unexported fields
}
ArgsEscapedOpt is the value returned by ArgsEscaped. It implements ContainerOption.
func ArgsEscaped ¶ added in v0.8.1
func ArgsEscaped(v bool) ArgsEscapedOpt
ArgsEscaped marks the command as already escaped (Windows). Engine-only.
type ArgsOpt ¶ added in v0.8.1
type ArgsOpt struct {
// contains filtered or unexported fields
}
ArgsOpt is the value returned by Args. It implements EnginePluginInstallOption, EnginePluginSetOption, and EnginePluginUpgradeOption.
func Args ¶ added in v0.8.1
Args sets plugin arguments for SetPlugin, InstallPlugin, and UpgradePlugin.
type AssumeYesOpt ¶ added in v0.8.1
type AssumeYesOpt struct {
// contains filtered or unexported fields
}
AssumeYesOpt is the value returned by AssumeYes. It implements ComposeCreateOption, PublishOption, RunOption, and UpOption.
func AssumeYes ¶ added in v0.8.1
func AssumeYes(v bool) AssumeYesOpt
AssumeYes answers yes to prompts.
type AttachOpt ¶ added in v0.8.1
type AttachOpt struct {
// contains filtered or unexported fields
}
AttachOpt is the value returned by Attach. It implements RunOption and ServiceOption.
type AttachOption ¶ added in v0.8.1
type AttachOption interface {
// contains filtered or unexported methods
}
AttachOption configures Compose.Attach.
type AttachStderrOpt ¶ added in v0.8.1
type AttachStderrOpt struct {
// contains filtered or unexported fields
}
AttachStderrOpt is the value returned by AttachStderr. It implements ContainerOption, EngineAttachOption, EngineExecCreateOption, and LogsOption.
func AttachStderr ¶ added in v0.8.1
func AttachStderr(v bool) AttachStderrOpt
AttachStderr attaches stderr. Engine-only.
type AttachStdinOpt ¶ added in v0.8.1
type AttachStdinOpt struct {
// contains filtered or unexported fields
}
AttachStdinOpt is the value returned by AttachStdin. It implements ContainerOption, EngineAttachOption, and EngineExecCreateOption.
func AttachStdin ¶ added in v0.8.1
func AttachStdin(v bool) AttachStdinOpt
AttachStdin attaches stdin. Engine-only.
type AttachStdoutOpt ¶ added in v0.8.1
type AttachStdoutOpt struct {
// contains filtered or unexported fields
}
AttachStdoutOpt is the value returned by AttachStdout. It implements ContainerOption, EngineAttachOption, EngineExecCreateOption, and LogsOption.
func AttachStdout ¶ added in v0.8.1
func AttachStdout(v bool) AttachStdoutOpt
AttachStdout attaches stdout. Engine-only.
type AttachToOpt ¶ added in v0.8.1
type AttachToOpt struct {
// contains filtered or unexported fields
}
AttachToOpt is the value returned by AttachTo. It implements ComposeStartOption and UpOption.
func AttachTo ¶ added in v0.8.1
func AttachTo(names ...string) AttachToOpt
AttachTo selects services to attach on start/up.
type AttachableOpt ¶ added in v0.8.1
type AttachableOpt struct {
// contains filtered or unexported fields
}
AttachableOpt is the value returned by Attachable. It implements ComposeNetOption and EngineNetworkOption.
func Attachable ¶ added in v0.8.1
func Attachable(v bool) AttachableOpt
Attachable marks a project network as attachable.
type AttestationsOpt ¶ added in v0.8.1
type AttestationsOpt struct {
// contains filtered or unexported fields
}
AttestationsOpt is the value returned by Attestations. It implements ComposeBuildOption, ComposeCreateOption, UpOption, and WatchOption.
func Attestations ¶ added in v0.8.1
func Attestations(v bool) AttestationsOpt
Attestations enables build attestations on Compose.Build, including explicit false.
type AuthorOpt ¶ added in v0.8.1
type AuthorOpt struct {
// contains filtered or unexported fields
}
AuthorOpt is the value returned by Author. It implements CommitOption and EngineCommitOption.
func Author ¶ added in v0.8.1
Author sets the image author on Compose.Commit.
type AutoRemoveOpt ¶ added in v0.8.1
type AutoRemoveOpt struct {
// contains filtered or unexported fields
}
AutoRemoveOpt is the value returned by AutoRemove. It implements ContainerOption and RunOption.
func AutoRemove ¶ added in v0.8.1
func AutoRemove(v bool) AutoRemoveOpt
AutoRemove removes the container on exit. Engine-only; converting to a Compose service reports an unsupported mapping.
type AuxAddressOpt ¶ added in v0.8.1
type AuxAddressOpt struct {
// contains filtered or unexported fields
}
AuxAddressOpt is the value returned by AuxAddress. It implements ComposeNetOption.
func AuxAddress ¶ added in v0.8.1
func AuxAddress(host, addr string) AuxAddressOpt
AuxAddress adds Compose networks.ipam.config.aux_addresses inside AddNetwork.
type AvailabilityOpt ¶ added in v0.8.1
type AvailabilityOpt struct {
// contains filtered or unexported fields
}
AvailabilityOpt is the value returned by Availability. It implements EngineNodeUpdateOption.
func Availability ¶ added in v0.8.1
func Availability[T ~string](a T) AvailabilityOpt
Availability sets swarm node availability on UpdateNode. Known values live in package avail.
type BuildCacheOpt ¶ added in v0.8.1
type BuildCacheOpt struct {
// contains filtered or unexported fields
}
BuildCacheOpt is the value returned by BuildCache. It implements EngineDiskUsageOption.
func BuildCache ¶ added in v0.8.1
func BuildCache(v bool) BuildCacheOpt
BuildCache includes build-cache disk usage on DiskUsage, including explicit false.
type BuildCachePruneOptions ¶ added in v0.8.1
type BuildCachePruneOptions = clienttypes.BuildCachePruneOptions
Remaining Engine client option and result types used by Engine.
type BuildCachePruneResult ¶ added in v0.8.1
type BuildCachePruneResult = clienttypes.BuildCachePruneResult
Remaining Engine client option and result types used by Engine.
func PruneBuildCache ¶ added in v0.8.1
func PruneBuildCache(ctx context.Context, api Engine, opts ...EngineBuildCachePruneOption) (BuildCachePruneResult, error)
PruneBuildCache wraps the corresponding Engine client method.
type BuildCancelOptions ¶ added in v0.8.1
type BuildCancelOptions = clienttypes.BuildCancelOptions
Remaining Engine client option and result types used by Engine.
type BuildCancelResult ¶ added in v0.8.1
type BuildCancelResult = clienttypes.BuildCancelResult
Remaining Engine client option and result types used by Engine.
func CancelBuild ¶ added in v0.8.1
CancelBuild wraps the corresponding Engine client method.
type BuildOpt ¶ added in v0.8.1
type BuildOpt struct {
// contains filtered or unexported fields
}
BuildOpt is the value returned by Build. It implements JobOption and ServiceOption.
func Build ¶
func Build(opts ...BuildOption) BuildOpt
Build sets Compose build configuration. Service and job only.
type BuildOption ¶ added in v0.8.1
type BuildOption interface {
// contains filtered or unexported methods
}
BuildOption configures a nested Build scope.
type BuilderOpt ¶ added in v0.8.1
type BuilderOpt struct {
// contains filtered or unexported fields
}
BuilderOpt is the value returned by Builder. It implements ComposeBuildOption, ComposeCreateOption, UpOption, and WatchOption.
func Builder ¶ added in v0.8.1
func Builder(s string) BuilderOpt
Builder selects a buildx builder for compose build.
type CPUsOpt ¶ added in v0.8.1
type CPUsOpt struct {
// contains filtered or unexported fields
}
CPUsOpt is the value returned by CPUs. It implements ContainerOption, DeployOption, JobOption, ReserveOption, and ServiceOption.
type CacheFromOpt ¶ added in v0.8.1
type CacheFromOpt struct {
// contains filtered or unexported fields
}
CacheFromOpt is the value returned by CacheFrom. It implements BuildOption.
func CacheFrom ¶ added in v0.8.1
func CacheFrom(s string) CacheFromOpt
CacheFrom adds a build cache_from entry inside Build.
type CacheToOpt ¶ added in v0.8.1
type CacheToOpt struct {
// contains filtered or unexported fields
}
CacheToOpt is the value returned by CacheTo. It implements BuildOption.
func CacheTo ¶ added in v0.8.1
func CacheTo(s string) CacheToOpt
CacheTo adds a build cache_to entry inside Build.
type CapAddOpt ¶ added in v0.8.1
type CapAddOpt struct {
// contains filtered or unexported fields
}
CapAddOpt is the value returned by CapAdd. It implements ContainerOption, JobOption, RunOption, and ServiceOption.
func CapAdd ¶ added in v0.8.1
func CapAdd(c Capability) CapAddOpt
CapAdd adds a Linux capability. Pass cap.ALL or a kernel name such as cap.NET_ADMIN.
type CapDropOpt ¶ added in v0.8.1
type CapDropOpt struct {
// contains filtered or unexported fields
}
CapDropOpt is the value returned by CapDrop. It implements ContainerOption, JobOption, RunOption, and ServiceOption.
func CapDrop ¶ added in v0.8.1
func CapDrop(c Capability) CapDropOpt
CapDrop drops a Linux capability. Pass cap.ALL or a kernel name such as cap.MKNOD.
type CapabilitiesOpt ¶ added in v0.8.1
type CapabilitiesOpt struct {
// contains filtered or unexported fields
}
CapabilitiesOpt is the value returned by Capabilities. It implements GPUOption.
func Capabilities ¶ added in v0.8.1
func Capabilities(c string) CapabilitiesOpt
Capabilities adds a GPU capability (typically "gpu") inside GPU.
type Capability ¶ added in v0.8.1
type Capability = cap.Capability
Capability is a Linux capability name. Known values live in package cap (for example cap.NET_ADMIN, cap.ALL).
type Cascade ¶ added in v0.8.1
Cascade is a Compose start/up OnExit action. Known values live in package cascade.
type CertOpt ¶ added in v0.8.1
type CertOpt struct {
// contains filtered or unexported fields
}
CertOpt is the value returned by Cert. It implements TLSOption.
type ChangeOpt ¶ added in v0.8.1
type ChangeOpt struct {
// contains filtered or unexported fields
}
ChangeOpt is the value returned by Change. It implements CommitOption.
func Change ¶ added in v0.8.1
Change adds a Dockerfile instruction applied on Compose.Commit.
type CheckOpt ¶ added in v0.8.1
type CheckOpt struct {
// contains filtered or unexported fields
}
CheckOpt is the value returned by Check. It implements ComposeBuildOption, ComposeCreateOption, UpOption, and WatchOption.
type CheckpointCreateOptions ¶ added in v0.8.1
type CheckpointCreateOptions = clienttypes.CheckpointCreateOptions
Remaining Engine client option and result types used by Engine.
type CheckpointCreateResult ¶ added in v0.8.1
type CheckpointCreateResult = clienttypes.CheckpointCreateResult
Remaining Engine client option and result types used by Engine.
func CreateCheckpoint ¶ added in v0.8.1
func CreateCheckpoint(ctx context.Context, api Engine, id string, opts ...EngineCheckpointCreateOption) (CheckpointCreateResult, error)
CreateCheckpoint wraps the corresponding Engine client method.
type CheckpointDirOpt ¶ added in v0.8.1
type CheckpointDirOpt struct {
// contains filtered or unexported fields
}
CheckpointDirOpt is the value returned by CheckpointDir. It implements EngineCheckpointCreateOption, EngineCheckpointListOption, EngineCheckpointRemoveOption, and EngineStartOption.
func CheckpointDir ¶ added in v0.8.1
func CheckpointDir(dir string) CheckpointDirOpt
CheckpointDir sets the checkpoint directory.
type CheckpointListOptions ¶ added in v0.8.1
type CheckpointListOptions = clienttypes.CheckpointListOptions
Remaining Engine client option and result types used by Engine.
type CheckpointListResult ¶ added in v0.8.1
type CheckpointListResult = clienttypes.CheckpointListResult
Remaining Engine client option and result types used by Engine.
func ListCheckpoints ¶ added in v0.8.1
func ListCheckpoints(ctx context.Context, api Engine, id string, opts ...EngineCheckpointListOption) (CheckpointListResult, error)
ListCheckpoints wraps the corresponding Engine client method.
type CheckpointOpt ¶ added in v0.8.1
type CheckpointOpt struct {
// contains filtered or unexported fields
}
CheckpointOpt is the value returned by Checkpoint. It implements EngineCheckpointCreateOption, EngineCheckpointRemoveOption, and EngineStartOption.
func Checkpoint ¶ added in v0.8.1
func Checkpoint(id string) CheckpointOpt
Checkpoint starts from a checkpoint id.
type CheckpointRemoveOptions ¶ added in v0.8.1
type CheckpointRemoveOptions = clienttypes.CheckpointRemoveOptions
Remaining Engine client option and result types used by Engine.
type CheckpointRemoveResult ¶ added in v0.8.1
type CheckpointRemoveResult = clienttypes.CheckpointRemoveResult
Remaining Engine client option and result types used by Engine.
func RemoveCheckpoint ¶ added in v0.8.1
func RemoveCheckpoint(ctx context.Context, api Engine, id string, opts ...EngineCheckpointRemoveOption) (CheckpointRemoveResult, error)
RemoveCheckpoint wraps the corresponding Engine client method.
type Client ¶ added in v0.8.1
type Client struct {
// contains filtered or unexported fields
}
Client is one connection to a Docker daemon: Engine API and Compose runtime. Construct with Connect (dials the environment) or NewClient (tests and already-open clients).
func Connect ¶ added in v0.8.1
func Connect(opts ...ComposerClientOption) (*Client, error)
Connect dials one Engine and one in-process Composer from the same options. With none, it reads the daemon from the environment (FromEnv).
Example ¶
package main
import (
"github.com/aptd3v/containerkit/pkg/kit"
)
func main() {
cli := kit.NewClient(nil, nil)
_ = cli.Engine()
_ = cli.Composer()
}
Output:
func NewClient ¶ added in v0.8.1
NewClient binds an existing Engine and Composer. Connect is the usual constructor. Like other constructors except Connect, NewEngine, and NewComposer, NewClient does not return an error; methods fail if a client is missing.
func (*Client) Close ¶ added in v0.8.1
Close closes the Engine connection. The Composer uses the same connection.
func (*Client) Load ¶ added in v0.8.1
Load loads compose YAML through this client's Composer. Local YAML with no daemon is ImportFile.
type ClientOption ¶ added in v0.8.1
type ClientOption interface {
// contains filtered or unexported methods
}
ClientOption configures NewEngine.
type ClusterSpecOpt ¶ added in v0.8.1
type ClusterSpecOpt struct {
// contains filtered or unexported fields
}
ClusterSpecOpt is the value returned by ClusterSpec. It implements EngineVolumeUpdateOption.
func ClusterSpec ¶ added in v0.8.1
func ClusterSpec(spec *ClusterVolumeSpec) ClusterSpecOpt
ClusterSpec sets the cluster volume spec on UpdateVolume.
type ClusterVolumeSpec ¶ added in v0.8.1
type ClusterVolumeSpec = volumetypes.ClusterVolumeSpec
Remaining Engine client option and result types used by Engine.
type ColorOpt ¶ added in v0.8.1
type ColorOpt struct {
// contains filtered or unexported fields
}
ColorOpt is the value returned by Color. It implements LoggerOption.
type CommandOpt ¶ added in v0.8.1
type CommandOpt struct {
// contains filtered or unexported fields
}
CommandOpt is the value returned by Command. It implements ContainerOption, EngineExecCreateOption, EngineServiceCreateOption, EngineServiceUpdateOption, HookOption, JobOption, RunOption, ServiceOption, and WatchTriggerOption.
func Command ¶ added in v0.8.1
func Command(cmd ...string) CommandOpt
Command sets the command (argv) for a container, service, job, Compose.Run, or CreateExec / ExecTerminal.
type CommentOpt ¶ added in v0.8.1
type CommentOpt struct {
// contains filtered or unexported fields
}
CommentOpt is the value returned by Comment. It implements CommitOption and EngineCommitOption.
func Comment ¶ added in v0.8.1
func Comment(s string) CommentOpt
Comment sets the commit message on Compose.Commit.
type CommitOption ¶ added in v0.8.1
type CommitOption interface {
// contains filtered or unexported methods
}
CommitOption configures Compose.Commit.
type CompatibilityOpt ¶ added in v0.8.1
type CompatibilityOpt struct {
// contains filtered or unexported fields
}
CompatibilityOpt is the value returned by Compatibility. It implements LoadProjectOption.
func Compatibility ¶ added in v0.8.1
func Compatibility(v bool) CompatibilityOpt
Compatibility enables Compose v1 compatibility mode on LoadProject.
type Compose ¶
type Compose struct {
// contains filtered or unexported fields
}
Compose is a Compose file: name, services, jobs, networks, volumes, secrets, and configs.
func Import ¶ added in v0.8.1
func Import(r io.Reader, opts ...ImportOption) *Compose
Import loads Compose YAML from r.
func ImportFile ¶ added in v0.8.1
func ImportFile(path string, opts ...ImportOption) *Compose
ImportFile loads a Compose file from path. Additional File options are overlay compose files (compose.yaml + compose.override.yaml).
func ImportYAML ¶ added in v0.8.1
func ImportYAML(yml []byte, opts ...ImportOption) *Compose
ImportYAML loads a Compose file from YAML bytes. Parse errors accumulate on the returned Compose; call Compose.Validate.
Example ¶
package main
import (
"fmt"
"github.com/aptd3v/containerkit/pkg/kit"
)
func main() {
yml := []byte(`
name: app
services:
api:
image: alpine:latest
`)
compose := kit.ImportYAML(yml)
fmt.Println(compose.Name(), compose.Services()[0].Name(), compose.Services()[0].Image())
}
Output: app api alpine:latest
func NewCompose ¶
func NewCompose(name string, opts ...ComposeOption) *Compose
NewCompose applies typed options and always returns a Compose file named name. Use fluent Compose.WithService / Compose.WithNetwork for top-level Compose YAML. Call Compose.Validate before Compose.Up.
func (*Compose) Attach ¶
func (p *Compose) Attach(ctx context.Context, api Composer, service string, opts ...AttachOption) error
Attach attaches to a running service container.
func (*Compose) Commit ¶
func (p *Compose) Commit(ctx context.Context, api Composer, service string, opts ...CommitOption) error
Commit creates an image from a service container.
func (*Compose) Copy ¶ added in v0.8.1
Copy copies files between a service container and the local filesystem.
func (*Compose) DryRunMode ¶ added in v0.8.1
DryRunMode enables or disables dry-run when the Composer implementation supports it. The Compose v5 SDK selects dry-run at construction time.
func (*Compose) Exec ¶
func (p *Compose) Exec(ctx context.Context, api Composer, service string, opts ...RunOption) (int, error)
Exec runs a command in a running service container.
func (*Compose) Export ¶
func (p *Compose) Export(ctx context.Context, api Composer, service string, opts ...ExportOption) error
Export writes a service container filesystem as a tar archive.
func (*Compose) ExportYAML ¶ added in v0.8.1
ExportYAML returns the YAML encoding of this Compose file.
func (*Compose) Images ¶
func (p *Compose) Images(ctx context.Context, api Composer, opts ...ImagesOption) (map[string]composeapi.ImageSummary, error)
Images lists images used by this Compose file.
func (*Compose) Logs ¶
func (p *Compose) Logs(ctx context.Context, api Composer, consumer composeapi.LogConsumer, opts ...LogsOption) error
Logs streams service logs.
func (*Compose) MaxConcurrency ¶ added in v0.8.1
MaxConcurrency limits concurrent Engine operations when the Composer implementation supports it. The Compose v5 SDK sets concurrency at construction time; this is a no-op on that service.
func (*Compose) Port ¶
func (p *Compose) Port(ctx context.Context, api Composer, service string, port uint16, opts ...ComposePortOption) (string, int, error)
Port looks up a published port for a service.
func (*Compose) Project ¶
func (p *Compose) Project() (*composetypes.Project, error)
Project returns the compose-go object model for this Compose file.
func (*Compose) Ps ¶
func (p *Compose) Ps(ctx context.Context, api Composer, opts ...PsOption) ([]composeapi.ContainerSummary, error)
Ps lists containers for this Compose file.
func (*Compose) PublishOCI ¶ added in v0.8.1
func (p *Compose) PublishOCI(ctx context.Context, api Composer, repository string, opts ...PublishOption) error
PublishOCI publishes the Compose application as an OCI artifact. Port mappings use the Publish setter, not this method.
func (*Compose) Run ¶
func (p *Compose) Run(ctx context.Context, api Composer, service string, opts ...RunOption) (int, error)
Run runs a one-off command on a service.
func (*Compose) Services ¶ added in v0.8.1
Services returns the configured services in definition order.
func (*Compose) Top ¶
func (p *Compose) Top(ctx context.Context, api Composer, services ...string) ([]composeapi.ContainerProcSummary, error)
Top shows running processes.
func (*Compose) Validate ¶ added in v0.8.1
Validate reports accumulated option errors, nested service/job errors, and missing required fields.
func (*Compose) VolumeList ¶ added in v0.8.1
func (p *Compose) VolumeList(ctx context.Context, api Composer, opts ...VolumesListOption) ([]composeapi.VolumesSummary, error)
VolumeList lists volumes used by this Compose file.
func (*Compose) WithFile ¶ added in v0.8.1
func (p *Compose) WithFile(opts ...ComposeFileOption) *Compose
WithFile defines a top-level Compose config object.
func (*Compose) WithModel ¶ added in v0.8.1
func (p *Compose) WithModel(opts ...ComposeModelOption) *Compose
WithModel defines a top-level Compose model.
func (*Compose) WithNetwork ¶ added in v0.8.1
func (p *Compose) WithNetwork(opts ...ComposeNetOption) *Compose
WithNetwork defines a top-level Compose network.
func (*Compose) WithSecret ¶ added in v0.8.1
func (p *Compose) WithSecret(opts ...ComposeSecretOption) *Compose
WithSecret defines a top-level Compose secret.
func (*Compose) WithService ¶ added in v0.8.1
WithService appends a service and returns Compose for chaining.
func (*Compose) WithVolume ¶ added in v0.8.1
func (p *Compose) WithVolume(opts ...ComposeVolOption) *Compose
WithVolume defines a top-level Compose volume.
type ComposeBuildOption ¶ added in v0.8.1
type ComposeBuildOption interface {
// contains filtered or unexported methods
}
ComposeBuildOption configures Compose.Build.
type ComposeCreateOption ¶ added in v0.8.1
type ComposeCreateOption interface {
// contains filtered or unexported methods
}
ComposeCreateOption configures Compose.Create.
type ComposeFileOption ¶ added in v0.8.1
type ComposeFileOption interface {
// contains filtered or unexported methods
}
ComposeFileOption configures a top-level Compose AddFile definition.
type ComposeModelOption ¶ added in v0.8.1
type ComposeModelOption interface {
// contains filtered or unexported methods
}
ComposeModelOption configures a top-level Compose AddModel definition.
type ComposeNetOption ¶ added in v0.8.1
type ComposeNetOption interface {
// contains filtered or unexported methods
}
ComposeNetOption configures a top-level Compose AddNetwork definition.
type ComposeOption ¶ added in v0.8.1
type ComposeOption interface {
// contains filtered or unexported methods
}
ComposeOption configures a Compose.
type ComposePortOption ¶ added in v0.8.1
type ComposePortOption interface {
// contains filtered or unexported methods
}
ComposePortOption configures Compose.Port.
type ComposeRestartOption ¶ added in v0.8.1
type ComposeRestartOption interface {
// contains filtered or unexported methods
}
ComposeRestartOption configures Compose.Restart.
type ComposeSecretOption ¶ added in v0.8.1
type ComposeSecretOption interface {
// contains filtered or unexported methods
}
ComposeSecretOption configures a top-level Compose AddSecret definition.
type ComposeStartOption ¶ added in v0.8.1
type ComposeStartOption interface {
// contains filtered or unexported methods
}
ComposeStartOption configures Compose.Start.
type ComposeStopOption ¶ added in v0.8.1
type ComposeStopOption interface {
// contains filtered or unexported methods
}
ComposeStopOption configures Compose.Stop.
type ComposeVolOption ¶ added in v0.8.1
type ComposeVolOption interface {
// contains filtered or unexported methods
}
ComposeVolOption configures a top-level Compose AddVolume definition.
type Composer ¶ added in v0.8.1
type Composer = composeapi.Compose
Composer is the Compose runtime surface. NewComposer returns one.
func NewComposer ¶ added in v0.8.1
func NewComposer(opts ...ComposerClientOption) (Composer, error)
NewComposer constructs an in-process Compose SDK service (no docker CLI shell-out). Prefer Connect when the program also needs an Engine client. Options are the same ClientOption values as NewEngine, plus Log, MaxConcurrency, DryRun, and OutputStream. With none, it reads the daemon from the environment (FromEnv).
type ComposerClientOption ¶ added in v0.8.1
type ComposerClientOption interface {
// contains filtered or unexported methods
}
ComposerClientOption configures NewComposer. Engine ClientOption values also implement this interface, as do Log, MaxConcurrency, DryRun, and OutputStream.
type ConditionOpt ¶ added in v0.8.1
type ConditionOpt struct {
// contains filtered or unexported fields
}
ConditionOpt is the value returned by Condition. It implements DependOption.
func Condition ¶ added in v0.8.1
func Condition(c DependCondition) ConditionOpt
Condition sets a depends_on condition in a DependsOn scope.
type ConfigCreateOptions ¶ added in v0.8.1
type ConfigCreateOptions = clienttypes.ConfigCreateOptions
Remaining Engine client option and result types used by Engine.
type ConfigCreateResult ¶ added in v0.8.1
type ConfigCreateResult = clienttypes.ConfigCreateResult
Remaining Engine client option and result types used by Engine.
func CreateEngineConfig ¶ added in v0.8.1
func CreateEngineConfig(ctx context.Context, api Engine, opts ...EngineConfigCreateOption) (ConfigCreateResult, error)
CreateEngineConfig wraps Engine.ConfigCreate.
type ConfigInspectOptions ¶ added in v0.8.1
type ConfigInspectOptions = clienttypes.ConfigInspectOptions
Remaining Engine client option and result types used by Engine.
type ConfigInspectResult ¶ added in v0.8.1
type ConfigInspectResult = clienttypes.ConfigInspectResult
Remaining Engine client option and result types used by Engine.
func InspectConfig ¶ added in v0.8.1
InspectConfig wraps the corresponding Engine client method.
type ConfigListOptions ¶ added in v0.8.1
type ConfigListOptions = clienttypes.ConfigListOptions
Remaining Engine client option and result types used by Engine.
type ConfigListResult ¶ added in v0.8.1
type ConfigListResult = clienttypes.ConfigListResult
Remaining Engine client option and result types used by Engine.
func ListConfigs ¶ added in v0.8.1
func ListConfigs(ctx context.Context, api Engine, opts ...EngineConfigListOption) (ConfigListResult, error)
ListConfigs wraps the corresponding Engine client method.
type ConfigRemoveOptions ¶ added in v0.8.1
type ConfigRemoveOptions = clienttypes.ConfigRemoveOptions
Remaining Engine client option and result types used by Engine.
type ConfigRemoveResult ¶ added in v0.8.1
type ConfigRemoveResult = clienttypes.ConfigRemoveResult
Remaining Engine client option and result types used by Engine.
func RemoveConfig ¶ added in v0.8.1
RemoveConfig wraps the corresponding Engine client method.
type ConfigSpec ¶ added in v0.8.1
type ConfigSpec = swarmtypes.ConfigSpec
Remaining Engine client option and result types used by Engine.
type ConfigUpdateOptions ¶ added in v0.8.1
type ConfigUpdateOptions = clienttypes.ConfigUpdateOptions
Remaining Engine client option and result types used by Engine.
type ConfigUpdateResult ¶ added in v0.8.1
type ConfigUpdateResult = clienttypes.ConfigUpdateResult
Remaining Engine client option and result types used by Engine.
func UpdateEngineConfig ¶ added in v0.8.1
func UpdateEngineConfig(ctx context.Context, api Engine, id string, opts ...EngineConfigUpdateOption) (ConfigUpdateResult, error)
UpdateEngineConfig wraps Engine.ConfigUpdate.
type ConsoleSizeOpt ¶ added in v0.8.1
type ConsoleSizeOpt struct {
// contains filtered or unexported fields
}
ConsoleSizeOpt is the value returned by ConsoleSize. It implements ContainerOption, EngineExecAttachOption, EngineExecCreateOption, EngineExecResizeOption, EngineResizeOption, JobOption, and ServiceOption.
func ConsoleSize ¶ added in v0.8.1
func ConsoleSize(height, width uint) ConsoleSizeOpt
ConsoleSize sets the initial console height and width.
type ConstraintOpt ¶ added in v0.8.1
type ConstraintOpt struct {
// contains filtered or unexported fields
}
ConstraintOpt is the value returned by Constraint. It implements PlacementOption.
func Constraint ¶ added in v0.8.1
func Constraint(s string) ConstraintOpt
Constraint adds a placement constraint inside Placement.
type ConsumeLogsOpt ¶ added in v0.8.1
type ConsumeLogsOpt struct {
// contains filtered or unexported fields
}
ConsumeLogsOpt is the value returned by ConsumeLogs. It implements ComposeStartOption, UpOption, and WatchOption.
func ConsumeLogs ¶ added in v0.8.1
func ConsumeLogs(c composeapi.LogConsumer) ConsumeLogsOpt
ConsumeLogs attaches a log consumer on up/start/watch.
type Container ¶
type Container struct {
// contains filtered or unexported fields
}
Container is a standalone Engine container configuration that also converts to a Compose service when the settings map.
func ContainerFromOptions ¶ added in v0.8.1
ContainerFromOptions decodes a plan container option bag.
func NewContainer ¶
func NewContainer(opts ...ContainerOption) *Container
NewContainer applies typed options and always returns a container. Option and validation errors accumulate; call Container.Validate to inspect them.
func (*Container) Apply ¶ added in v0.8.1
func (c *Container) Apply(opts ...ContainerOption) error
Apply adds options to an existing container. Errors join the container's accumulated set and are also returned.
func (*Container) AsService ¶ added in v0.8.1
func (c *Container) AsService(opts ...ServiceOption) *Service
AsService converts a container into a Compose service. Extra service options apply after the container is copied.
func (*Container) Create ¶ added in v0.8.1
func (c *Container) Create(ctx context.Context, api Engine, opts ...EngineCreateOption) (Created, error)
Create sends the container to the Engine. Name() overrides the create-time name.
func (*Container) CreateName ¶ added in v0.8.1
CreateName returns the Engine create name from the container configuration.
func (*Container) EngineConfig ¶ added in v0.8.1
func (c *Container) EngineConfig() (*ContainerConfig, *HostConfig, *NetworkingConfig, error)
EngineConfig translates the container into Engine create structs.
func (*Container) Inspect ¶ added in v0.8.1
func (c *Container) Inspect(ctx context.Context, api Engine, id string, opts ...EngineInspectOption) (ContainerInspectResult, error)
Inspect returns Engine inspect data for a container ID.
func (*Container) Logs ¶ added in v0.8.1
func (c *Container) Logs(ctx context.Context, api Engine, id string, opts ...LogsOption) (ContainerLogsResult, error)
Logs returns Engine logs for a container ID.
func (*Container) Restart ¶ added in v0.8.1
func (c *Container) Restart(ctx context.Context, api Engine, id string, opts ...EngineStopOption) error
Restart restarts an Engine container by ID.
func (*Container) Start ¶ added in v0.8.1
func (c *Container) Start(ctx context.Context, api Engine, id string, opts ...EngineStartOption) error
Start starts an Engine container by ID.
func (*Container) Stop ¶ added in v0.8.1
func (c *Container) Stop(ctx context.Context, api Engine, id string, opts ...EngineStopOption) error
Stop stops an Engine container by ID.
func (*Container) Validate ¶
Validate reports accumulated option errors and missing required fields.
func (*Container) Wait ¶ added in v0.8.1
func (c *Container) Wait(ctx context.Context, api Engine, id string, opts ...EngineWaitOption) ContainerWaitResult
Wait waits for an Engine container to reach a condition.
type ContainerAttachOptions ¶ added in v0.8.1
type ContainerAttachOptions = clienttypes.ContainerAttachOptions
Remaining Engine client option and result types used by Engine.
type ContainerAttachResult ¶ added in v0.8.1
type ContainerAttachResult = clienttypes.ContainerAttachResult
Remaining Engine client option and result types used by Engine.
func AttachContainer ¶ added in v0.8.1
func AttachContainer(ctx context.Context, api Engine, id string, opts ...EngineAttachOption) (ContainerAttachResult, error)
AttachContainer wraps the corresponding Engine client method.
type ContainerCommitOptions ¶ added in v0.8.1
type ContainerCommitOptions = clienttypes.ContainerCommitOptions
Remaining Engine client option and result types used by Engine.
type ContainerCommitResult ¶ added in v0.8.1
type ContainerCommitResult = clienttypes.ContainerCommitResult
Remaining Engine client option and result types used by Engine.
func CommitContainer ¶ added in v0.8.1
func CommitContainer(ctx context.Context, api Engine, id string, opts ...EngineCommitOption) (ContainerCommitResult, error)
CommitContainer wraps the corresponding Engine client method.
type ContainerConfig ¶ added in v0.8.1
type ContainerConfig = containertypes.Config
Container configuration structs used by Container.EngineConfig.
type ContainerCreateOptions ¶ added in v0.8.1
type ContainerCreateOptions = clienttypes.ContainerCreateOptions
Engine client option and result types. They alias the Engine SDK so [client.Client] implements Engine without a kit caller importing that SDK.
type ContainerCreateResult ¶ added in v0.8.1
type ContainerCreateResult = clienttypes.ContainerCreateResult
Engine client option and result types. They alias the Engine SDK so [client.Client] implements Engine without a kit caller importing that SDK.
type ContainerDiffOptions ¶ added in v0.8.1
type ContainerDiffOptions = clienttypes.ContainerDiffOptions
Remaining Engine client option and result types used by Engine.
type ContainerDiffResult ¶ added in v0.8.1
type ContainerDiffResult = clienttypes.ContainerDiffResult
Remaining Engine client option and result types used by Engine.
func DiffContainer ¶ added in v0.8.1
DiffContainer wraps the corresponding Engine client method.
type ContainerExportOptions ¶ added in v0.8.1
type ContainerExportOptions = clienttypes.ContainerExportOptions
Remaining Engine client option and result types used by Engine.
type ContainerExportResult ¶ added in v0.8.1
type ContainerExportResult = clienttypes.ContainerExportResult
Remaining Engine client option and result types used by Engine.
func ExportContainer ¶ added in v0.8.1
ExportContainer wraps the corresponding Engine client method.
type ContainerIDFileOpt ¶ added in v0.8.1
type ContainerIDFileOpt struct {
// contains filtered or unexported fields
}
ContainerIDFileOpt is the value returned by ContainerIDFile. It implements ContainerOption.
func ContainerIDFile ¶ added in v0.8.1
func ContainerIDFile(p string) ContainerIDFileOpt
ContainerIDFile writes the container ID to a file. Engine-only.
type ContainerIDOpt ¶ added in v0.8.1
type ContainerIDOpt struct {
// contains filtered or unexported fields
}
ContainerIDOpt is the value returned by ContainerID. It implements EngineNetworkConnectOption and EngineNetworkDisconnectOption.
func ContainerID ¶ added in v0.8.1
func ContainerID(id string) ContainerIDOpt
ContainerID selects a container for network connect/disconnect.
type ContainerInspectOptions ¶ added in v0.8.1
type ContainerInspectOptions = clienttypes.ContainerInspectOptions
Engine client option and result types. They alias the Engine SDK so [client.Client] implements Engine without a kit caller importing that SDK.
type ContainerInspectResult ¶ added in v0.8.1
type ContainerInspectResult = clienttypes.ContainerInspectResult
Engine client option and result types. They alias the Engine SDK so [client.Client] implements Engine without a kit caller importing that SDK.
type ContainerKillOptions ¶ added in v0.8.1
type ContainerKillOptions = clienttypes.ContainerKillOptions
Engine client option and result types. They alias the Engine SDK so [client.Client] implements Engine without a kit caller importing that SDK.
type ContainerKillResult ¶ added in v0.8.1
type ContainerKillResult = clienttypes.ContainerKillResult
Engine client option and result types. They alias the Engine SDK so [client.Client] implements Engine without a kit caller importing that SDK.
type ContainerListOptions ¶ added in v0.8.1
type ContainerListOptions = clienttypes.ContainerListOptions
Remaining Engine client option and result types used by Engine.
type ContainerListResult ¶ added in v0.8.1
type ContainerListResult = clienttypes.ContainerListResult
Remaining Engine client option and result types used by Engine.
func ListContainers ¶ added in v0.8.1
func ListContainers(ctx context.Context, api Engine, opts ...EngineContainerListOption) (ContainerListResult, error)
ListContainers wraps the corresponding Engine client method.
type ContainerLogsOptions ¶ added in v0.8.1
type ContainerLogsOptions = clienttypes.ContainerLogsOptions
Engine client option and result types. They alias the Engine SDK so [client.Client] implements Engine without a kit caller importing that SDK.
type ContainerLogsResult ¶ added in v0.8.1
type ContainerLogsResult = clienttypes.ContainerLogsResult
Engine client option and result types. They alias the Engine SDK so [client.Client] implements Engine without a kit caller importing that SDK.
type ContainerNameOpt ¶ added in v0.8.1
type ContainerNameOpt struct {
// contains filtered or unexported fields
}
ContainerNameOpt is the value returned by ContainerName. It implements ServiceOption.
func ContainerName ¶ added in v0.8.1
func ContainerName(n string) ContainerNameOpt
ContainerName sets Compose container_name. Service only.
type ContainerOption ¶ added in v0.8.1
type ContainerOption interface {
// contains filtered or unexported methods
}
ContainerOption configures a Container.
type ContainerPauseOptions ¶ added in v0.8.1
type ContainerPauseOptions = clienttypes.ContainerPauseOptions
Engine client option and result types. They alias the Engine SDK so [client.Client] implements Engine without a kit caller importing that SDK.
type ContainerPauseResult ¶ added in v0.8.1
type ContainerPauseResult = clienttypes.ContainerPauseResult
Engine client option and result types. They alias the Engine SDK so [client.Client] implements Engine without a kit caller importing that SDK.
type ContainerPortOpt ¶ added in v0.8.1
type ContainerPortOpt struct {
// contains filtered or unexported fields
}
ContainerPortOpt is the value returned by ContainerPort. It implements PortOption.
func ContainerPort ¶ added in v0.8.1
func ContainerPort(n uint16) ContainerPortOpt
ContainerPort sets the container port in a Publish scope.
type ContainerPruneOptions ¶ added in v0.8.1
type ContainerPruneOptions = clienttypes.ContainerPruneOptions
Remaining Engine client option and result types used by Engine.
type ContainerPruneResult ¶ added in v0.8.1
type ContainerPruneResult = clienttypes.ContainerPruneResult
Remaining Engine client option and result types used by Engine.
func PruneContainers ¶ added in v0.8.1
func PruneContainers(ctx context.Context, api Engine, opts ...EngineContainerPruneOption) (ContainerPruneResult, error)
PruneContainers wraps the corresponding Engine client method.
type ContainerRemoveOptions ¶ added in v0.8.1
type ContainerRemoveOptions = clienttypes.ContainerRemoveOptions
Engine client option and result types. They alias the Engine SDK so [client.Client] implements Engine without a kit caller importing that SDK.
type ContainerRemoveResult ¶ added in v0.8.1
type ContainerRemoveResult = clienttypes.ContainerRemoveResult
Engine client option and result types. They alias the Engine SDK so [client.Client] implements Engine without a kit caller importing that SDK.
type ContainerRenameOptions ¶ added in v0.8.1
type ContainerRenameOptions = clienttypes.ContainerRenameOptions
Remaining Engine client option and result types used by Engine.
type ContainerRenameResult ¶ added in v0.8.1
type ContainerRenameResult = clienttypes.ContainerRenameResult
Remaining Engine client option and result types used by Engine.
func RenameContainer ¶ added in v0.8.1
func RenameContainer(ctx context.Context, api Engine, id string, opts ...EngineRenameOption) (ContainerRenameResult, error)
RenameContainer wraps the corresponding Engine client method.
type ContainerResizeOptions ¶ added in v0.8.1
type ContainerResizeOptions = clienttypes.ContainerResizeOptions
Remaining Engine client option and result types used by Engine.
type ContainerResizeResult ¶ added in v0.8.1
type ContainerResizeResult = clienttypes.ContainerResizeResult
Remaining Engine client option and result types used by Engine.
func ResizeContainer ¶ added in v0.8.1
func ResizeContainer(ctx context.Context, api Engine, id string, opts ...EngineResizeOption) (ContainerResizeResult, error)
ResizeContainer wraps the corresponding Engine client method.
type ContainerRestartOptions ¶ added in v0.8.1
type ContainerRestartOptions = clienttypes.ContainerRestartOptions
Engine client option and result types. They alias the Engine SDK so [client.Client] implements Engine without a kit caller importing that SDK.
type ContainerRestartResult ¶ added in v0.8.1
type ContainerRestartResult = clienttypes.ContainerRestartResult
Engine client option and result types. They alias the Engine SDK so [client.Client] implements Engine without a kit caller importing that SDK.
type ContainerSpec ¶ added in v0.8.1
type ContainerSpec = swarmtypes.ContainerSpec
Remaining Engine client option and result types used by Engine.
type ContainerStartOptions ¶ added in v0.8.1
type ContainerStartOptions = clienttypes.ContainerStartOptions
Engine client option and result types. They alias the Engine SDK so [client.Client] implements Engine without a kit caller importing that SDK.
type ContainerStartResult ¶ added in v0.8.1
type ContainerStartResult = clienttypes.ContainerStartResult
Engine client option and result types. They alias the Engine SDK so [client.Client] implements Engine without a kit caller importing that SDK.
type ContainerStatPathOptions ¶ added in v0.8.1
type ContainerStatPathOptions = clienttypes.ContainerStatPathOptions
Remaining Engine client option and result types used by Engine.
type ContainerStatPathResult ¶ added in v0.8.1
type ContainerStatPathResult = clienttypes.ContainerStatPathResult
Remaining Engine client option and result types used by Engine.
func StatPath ¶ added in v0.8.1
func StatPath(ctx context.Context, api Engine, id string, opts ...EngineStatPathOption) (ContainerStatPathResult, error)
StatPath wraps the corresponding Engine client method.
type ContainerStatsOptions ¶ added in v0.8.1
type ContainerStatsOptions = clienttypes.ContainerStatsOptions
Remaining Engine client option and result types used by Engine.
type ContainerStatsResult ¶ added in v0.8.1
type ContainerStatsResult = clienttypes.ContainerStatsResult
Remaining Engine client option and result types used by Engine.
func StatsContainer ¶ added in v0.8.1
func StatsContainer(ctx context.Context, api Engine, id string, opts ...EngineStatsOption) (ContainerStatsResult, error)
StatsContainer wraps the corresponding Engine client method.
type ContainerStopOptions ¶ added in v0.8.1
type ContainerStopOptions = clienttypes.ContainerStopOptions
Engine client option and result types. They alias the Engine SDK so [client.Client] implements Engine without a kit caller importing that SDK.
type ContainerStopResult ¶ added in v0.8.1
type ContainerStopResult = clienttypes.ContainerStopResult
Engine client option and result types. They alias the Engine SDK so [client.Client] implements Engine without a kit caller importing that SDK.
type ContainerTopOptions ¶ added in v0.8.1
type ContainerTopOptions = clienttypes.ContainerTopOptions
Remaining Engine client option and result types used by Engine.
type ContainerTopResult ¶ added in v0.8.1
type ContainerTopResult = clienttypes.ContainerTopResult
Remaining Engine client option and result types used by Engine.
func TopContainer ¶ added in v0.8.1
func TopContainer(ctx context.Context, api Engine, id string, opts ...EngineTopOption) (ContainerTopResult, error)
TopContainer wraps the corresponding Engine client method.
type ContainerUnpauseOptions ¶ added in v0.8.1
type ContainerUnpauseOptions = clienttypes.ContainerUnpauseOptions
Engine client option and result types. They alias the Engine SDK so [client.Client] implements Engine without a kit caller importing that SDK.
type ContainerUnpauseResult ¶ added in v0.8.1
type ContainerUnpauseResult = clienttypes.ContainerUnpauseResult
Engine client option and result types. They alias the Engine SDK so [client.Client] implements Engine without a kit caller importing that SDK.
type ContainerUpdateOptions ¶ added in v0.8.1
type ContainerUpdateOptions = clienttypes.ContainerUpdateOptions
Remaining Engine client option and result types used by Engine.
type ContainerUpdateResult ¶ added in v0.8.1
type ContainerUpdateResult = clienttypes.ContainerUpdateResult
Remaining Engine client option and result types used by Engine.
func UpdateContainer ¶ added in v0.8.1
func UpdateContainer(ctx context.Context, api Engine, id string, opts ...EngineUpdateOption) (ContainerUpdateResult, error)
UpdateContainer wraps the corresponding Engine client method.
type ContainerWaitOptions ¶ added in v0.8.1
type ContainerWaitOptions = clienttypes.ContainerWaitOptions
Engine client option and result types. They alias the Engine SDK so [client.Client] implements Engine without a kit caller importing that SDK.
type ContainerWaitResult ¶ added in v0.8.1
type ContainerWaitResult = clienttypes.ContainerWaitResult
Engine client option and result types. They alias the Engine SDK so [client.Client] implements Engine without a kit caller importing that SDK.
type ContainersOpt ¶ added in v0.8.1
type ContainersOpt struct {
// contains filtered or unexported fields
}
ContainersOpt is the value returned by Containers. It implements GenerateOption.
func Containers ¶ added in v0.8.1
func Containers(ids ...string) ContainersOpt
Containers selects Engine container IDs for Generate.
type ContentOpt ¶ added in v0.8.1
type ContentOpt struct {
// contains filtered or unexported fields
}
ContentOpt is the value returned by Content. It implements EngineConfigCreateOption, EngineConfigUpdateOption, EngineCopyToOption, EnginePluginCreateOption, EngineSecretCreateOption, and EngineSecretUpdateOption.
func Content ¶ added in v0.8.1
func Content(r io.Reader) ContentOpt
Content supplies the archive body for CopyTo, CreatePlugin, or swarm secret/config data.
type ContextSizeOpt ¶ added in v0.8.1
type ContextSizeOpt struct {
// contains filtered or unexported fields
}
ContextSizeOpt is the value returned by ContextSize. It implements ComposeModelOption.
func ContextSize ¶ added in v0.8.1
func ContextSize(n int) ContextSizeOpt
ContextSize sets a top-level Compose model's context_size inside AddModel.
type CopyFromContainerOptions ¶ added in v0.8.1
type CopyFromContainerOptions = clienttypes.CopyFromContainerOptions
Remaining Engine client option and result types used by Engine.
type CopyFromContainerResult ¶ added in v0.8.1
type CopyFromContainerResult = clienttypes.CopyFromContainerResult
Remaining Engine client option and result types used by Engine.
func CopyFrom ¶ added in v0.8.1
func CopyFrom(ctx context.Context, api Engine, id string, opts ...EngineCopyFromOption) (CopyFromContainerResult, error)
CopyFrom wraps the corresponding Engine client method.
type CopyOption ¶ added in v0.8.1
type CopyOption interface {
// contains filtered or unexported methods
}
CopyOption configures Compose.Copy.
type CopyOpts ¶
type CopyOpts struct {
From string
Chown string
Chmod string
Link bool
Exclude []string
Parents bool
}
CopyOpts are optional flags on a Dockerfile COPY instruction.
type CopyPathOpt ¶ added in v0.8.1
type CopyPathOpt struct {
// contains filtered or unexported fields
}
CopyPathOpt is the value returned by CopyPath. It implements CopyOption.
func CopyPath ¶ added in v0.8.1
func CopyPath(source, destination string) CopyPathOpt
CopyPath sets source and destination for Compose.Copy.
type CopyToContainerOptions ¶ added in v0.8.1
type CopyToContainerOptions = clienttypes.CopyToContainerOptions
Remaining Engine client option and result types used by Engine.
type CopyToContainerResult ¶ added in v0.8.1
type CopyToContainerResult = clienttypes.CopyToContainerResult
Remaining Engine client option and result types used by Engine.
func CopyTo ¶ added in v0.8.1
func CopyTo(ctx context.Context, api Engine, id string, opts ...EngineCopyToOption) (CopyToContainerResult, error)
CopyTo wraps the corresponding Engine client method.
type CopyUIDGIDOpt ¶ added in v0.8.1
type CopyUIDGIDOpt struct {
// contains filtered or unexported fields
}
CopyUIDGIDOpt is the value returned by CopyUIDGID. It implements CopyOption and EngineCopyToOption.
func CopyUIDGID ¶ added in v0.8.1
func CopyUIDGID(v bool) CopyUIDGIDOpt
CopyUIDGID preserves uid/gid on Compose.Copy.
type CountOpt ¶ added in v0.8.1
type CountOpt struct {
// contains filtered or unexported fields
}
CountOpt is the value returned by Count. It implements GPUOption.
type CreateHostPathOpt ¶ added in v0.8.1
type CreateHostPathOpt struct {
// contains filtered or unexported fields
}
CreateHostPathOpt is the value returned by CreateHostPath. It implements VolumeOption.
func CreateHostPath ¶ added in v0.8.1
func CreateHostPath(v bool) CreateHostPathOpt
CreateHostPath sets Compose volumes.bind.create_host_path inside Volume.
type Created ¶ added in v0.8.1
Created is the result of Container.Create.
type CredentialConfigOpt ¶ added in v0.8.1
type CredentialConfigOpt struct {
// contains filtered or unexported fields
}
CredentialConfigOpt is the value returned by CredentialConfig. It implements ServiceOption.
func CredentialConfig ¶ added in v0.8.1
func CredentialConfig(name string) CredentialConfigOpt
CredentialConfig sets Compose credential_spec.config. Service only.
type CredentialFileOpt ¶ added in v0.8.1
type CredentialFileOpt struct {
// contains filtered or unexported fields
}
CredentialFileOpt is the value returned by CredentialFile. It implements ServiceOption.
func CredentialFile ¶ added in v0.8.1
func CredentialFile(path string) CredentialFileOpt
CredentialFile sets Compose credential_spec.file. Service only.
type CredentialRegistryOpt ¶ added in v0.8.1
type CredentialRegistryOpt struct {
// contains filtered or unexported fields
}
CredentialRegistryOpt is the value returned by CredentialRegistry. It implements ServiceOption.
func CredentialRegistry ¶ added in v0.8.1
func CredentialRegistry(p string) CredentialRegistryOpt
CredentialRegistry sets Compose credential_spec.registry. Service only.
type DataOpt ¶ added in v0.8.1
type DataOpt struct {
// contains filtered or unexported fields
}
DataOpt is the value returned by Data. It implements EngineConfigCreateOption, EngineConfigUpdateOption, EngineSecretCreateOption, and EngineSecretUpdateOption.
type DataPathAddrOpt ¶ added in v0.8.1
type DataPathAddrOpt struct {
// contains filtered or unexported fields
}
DataPathAddrOpt is the value returned by DataPathAddr. It implements EngineSwarmInitOption and EngineSwarmJoinOption.
func DataPathAddr ¶ added in v0.8.1
func DataPathAddr(addr string) DataPathAddrOpt
DataPathAddr sets the address used for data-path traffic.
type DelayOpt ¶ added in v0.8.1
type DelayOpt struct {
// contains filtered or unexported fields
}
DelayOpt is the value returned by Delay. It implements RestartOption and UpdateOption.
type DependCondition ¶ added in v0.8.1
DependCondition is a Compose depends_on condition. Known values live in package depend. The setter is Condition.
type DependOption ¶ added in v0.8.1
type DependOption interface {
// contains filtered or unexported methods
}
DependOption configures a nested DependsOn scope.
type DependsOnOpt ¶ added in v0.8.1
type DependsOnOpt struct {
// contains filtered or unexported fields
}
DependsOnOpt is the value returned by DependsOn. It implements JobOption and ServiceOption.
func DependsOn ¶ added in v0.8.1
func DependsOn(opts ...DependOption) DependsOnOpt
DependsOn adds a service dependency with nested setters (Name, Condition).
type DeployOpt ¶ added in v0.8.1
type DeployOpt struct {
// contains filtered or unexported fields
}
DeployOpt is the value returned by Deploy. It implements ServiceOption.
func Deploy ¶
func Deploy(opts ...DeployOption) DeployOpt
Deploy sets Compose deploy configuration. Service only.
type DeployOption ¶ added in v0.8.1
type DeployOption interface {
// contains filtered or unexported methods
}
DeployOption configures a nested Deploy scope.
type DepsOpt ¶ added in v0.8.1
type DepsOpt struct {
// contains filtered or unexported fields
}
DepsOpt is the value returned by Deps. It implements ComposeBuildOption, ComposeCreateOption, UpOption, and WatchOption.
type DetachKeysOpt ¶ added in v0.8.1
type DetachKeysOpt struct {
// contains filtered or unexported fields
}
DetachKeysOpt is the value returned by DetachKeys. It implements AttachOption, EngineAttachOption, and EngineExecCreateOption.
func DetachKeys ¶ added in v0.8.1
func DetachKeys(s string) DetachKeysOpt
DetachKeys sets the attach detach key sequence.
type DetachOpt ¶ added in v0.8.1
type DetachOpt struct {
// contains filtered or unexported fields
}
DetachOpt is the value returned by Detach. It implements EngineExecStartOption, RunOption, and UpOption.
type DetailsOpt ¶ added in v0.8.1
type DetailsOpt struct {
// contains filtered or unexported fields
}
DetailsOpt is the value returned by Details. It implements EngineServiceLogsOption, EngineTaskLogsOption, and LogsOption.
func Details ¶ added in v0.8.1
func Details(v bool) DetailsOpt
Details includes extra log attributes on Engine logs.
type DevelopOpt ¶ added in v0.8.1
type DevelopOpt struct {
// contains filtered or unexported fields
}
DevelopOpt is the value returned by Develop. It implements ServiceOption.
func Develop ¶
func Develop(opts ...DevelopOption) DevelopOpt
Develop sets Compose develop.watch. Service only.
type DevelopOption ¶ added in v0.8.1
type DevelopOption interface {
// contains filtered or unexported methods
}
DevelopOption configures a nested Develop scope.
type DeviceOpt ¶ added in v0.8.1
type DeviceOpt struct {
// contains filtered or unexported fields
}
DeviceOpt is the value returned by Device. It implements ContainerOption, JobOption, and ServiceOption.
func Device ¶ added in v0.8.1
func Device(opts ...DeviceOption) DeviceOpt
Device maps a host device into the container (Engine Devices / Compose devices).
type DeviceOption ¶ added in v0.8.1
type DeviceOption interface {
// contains filtered or unexported methods
}
DeviceOption configures a nested Device mapping.
type DialContextOpt ¶ added in v0.8.1
type DialContextOpt struct {
// contains filtered or unexported fields
}
DialContextOpt is the value returned by DialContext. It implements ClientOption and ComposerClientOption.
func DialContext ¶ added in v0.8.1
func DialContext(fn func(ctx context.Context, network, addr string) (net.Conn, error)) DialContextOpt
DialContext sets the dialer used by the Engine HTTP transport.
type DisabledOpt ¶ added in v0.8.1
type DisabledOpt struct {
// contains filtered or unexported fields
}
DisabledOpt is the value returned by Disabled. It implements EnginePluginInstallOption, EnginePluginUpgradeOption, and HealthOption.
func Disabled ¶ added in v0.8.1
func Disabled(v bool) DisabledOpt
Disabled disables a healthcheck, or leaves a plugin disabled after InstallPlugin / UpgradePlugin.
type DiscreteOpt ¶ added in v0.8.1
type DiscreteOpt struct {
// contains filtered or unexported fields
}
DiscreteOpt is the value returned by Discrete. It implements DeployOption and ReserveOption.
func Discrete ¶ added in v0.8.1
func Discrete(kind string, value int64) DiscreteOpt
Discrete adds Compose deploy.resources.generic_resources.discrete_resource_spec.
type DiskUsageObject ¶ added in v0.8.1
DiskUsageObject is an Engine DiskUsage type filter. Known values live in package df.
type DiskUsageOptions ¶ added in v0.8.1
type DiskUsageOptions = clienttypes.DiskUsageOptions
Remaining Engine client option and result types used by Engine.
type DiskUsageResult ¶ added in v0.8.1
type DiskUsageResult = clienttypes.DiskUsageResult
Remaining Engine client option and result types used by Engine.
func DiskUsage ¶ added in v0.8.1
func DiskUsage(ctx context.Context, api Engine, opts ...EngineDiskUsageOption) (DiskUsageResult, error)
DiskUsage wraps the corresponding Engine client method.
type DistributionInspectOptions ¶ added in v0.8.1
type DistributionInspectOptions = clienttypes.DistributionInspectOptions
Remaining Engine client option and result types used by Engine.
type DistributionInspectResult ¶ added in v0.8.1
type DistributionInspectResult = clienttypes.DistributionInspectResult
Remaining Engine client option and result types used by Engine.
func InspectDistribution ¶ added in v0.8.1
func InspectDistribution(ctx context.Context, api Engine, image string) (DistributionInspectResult, error)
InspectDistribution wraps the corresponding Engine client method.
type DockerFile ¶
DockerFile is the contract consumed by Build and BuildImage. *Dockerfile from NewDockerfile, ParseDockerfile, and ReadDockerfile implements it.
type Dockerfile ¶
type Dockerfile struct {
// contains filtered or unexported fields
}
Dockerfile is a fluent Dockerfile builder. Pass it to Build or BuildImage. Not safe for concurrent use.
Example ¶
package main
import (
"fmt"
"strings"
"github.com/aptd3v/containerkit/pkg/kit"
)
func main() {
df := kit.NewDockerfile().
From("alpine", "latest").
Run("apk add --no-cache curl").
Command("sleep", "infinity")
compose := kit.NewCompose("app").WithService(
kit.NewService(kit.Name("api"), kit.Build(df)),
)
yml, err := compose.ExportYAML()
if err != nil {
panic(err)
}
fmt.Println(strings.Contains(string(yml), "dockerfile_inline:"))
fmt.Println(strings.Contains(string(yml), "FROM alpine:latest"))
}
Output: true true
func NewDockerfile ¶ added in v0.8.1
func NewDockerfile() *Dockerfile
NewDockerfile creates a fluent Dockerfile builder.
func ParseDockerfile ¶
func ParseDockerfile(content string) *Dockerfile
ParseDockerfile wraps existing Dockerfile text. An empty string records a validation error.
func ReadDockerfile ¶
func ReadDockerfile(path string) *Dockerfile
ReadDockerfile reads a Dockerfile from path. Read errors are returned by Validate.
func (*Dockerfile) Add ¶
func (d *Dockerfile) Add(src, dest string, opts ...AddOpts) *Dockerfile
Add sets an ADD instruction. At most one AddOpts value is accepted.
func (*Dockerfile) Archive ¶ added in v0.8.1
func (d *Dockerfile) Archive(contextDir string) (io.Reader, error)
Archive returns a tar build context for BuildImage. contextDir is packed when non-empty; an empty directory packs only this Dockerfile. A .dockerignore in contextDir is honored. The fluent Dockerfile is written as "Dockerfile".
func (*Dockerfile) Arg ¶
func (d *Dockerfile) Arg(name string, defaultValue ...string) *Dockerfile
Arg sets an ARG instruction, with an optional default value.
func (*Dockerfile) Check ¶
func (d *Dockerfile) Check(value string) *Dockerfile
Check sets the # check= parser directive.
func (*Dockerfile) Command ¶
func (d *Dockerfile) Command(executable string, args ...string) *Dockerfile
Command sets CMD in JSON exec form. A second CMD records an error and is not written.
func (*Dockerfile) CommandShell ¶
func (d *Dockerfile) CommandShell(executable string, args ...string) *Dockerfile
CommandShell sets CMD in shell form. A second CMD records an error and is not written.
func (*Dockerfile) Comment ¶
func (d *Dockerfile) Comment(comment string) *Dockerfile
Comment writes a dockerfile comment.
func (*Dockerfile) Copy ¶
func (d *Dockerfile) Copy(src, dest string, opts ...CopyOpts) *Dockerfile
Copy sets a COPY instruction. At most one CopyOpts value is accepted.
func (*Dockerfile) Entrypoint ¶
func (d *Dockerfile) Entrypoint(executable string, args ...string) *Dockerfile
Entrypoint sets the JSON exec form of ENTRYPOINT.
func (*Dockerfile) EntrypointShell ¶
func (d *Dockerfile) EntrypointShell(executable string, args ...string) *Dockerfile
EntrypointShell sets the shell form of ENTRYPOINT.
func (*Dockerfile) Env ¶
func (d *Dockerfile) Env(key, value string) *Dockerfile
Env sets an ENV instruction.
func (*Dockerfile) Escape ¶
func (d *Dockerfile) Escape(char string) *Dockerfile
Escape sets the # escape= parser directive. char must be \ or `.
func (*Dockerfile) Export ¶
func (d *Dockerfile) Export(path string, mode os.FileMode) error
Export writes the dockerfile to path after validation.
func (*Dockerfile) Expose ¶
func (d *Dockerfile) Expose(port string) *Dockerfile
Expose sets an EXPOSE instruction.
func (*Dockerfile) Format ¶
func (d *Dockerfile) Format(args ...any) *Dockerfile
Format substitutes %s placeholders in the current dockerfile text.
func (*Dockerfile) From ¶
func (d *Dockerfile) From(image string, tag ...string) *Dockerfile
From sets the FROM instruction. Pass the tag in image ("alpine:latest") or as the second argument.
func (*Dockerfile) FromAs ¶
func (d *Dockerfile) FromAs(image, alias string) *Dockerfile
FromAs sets FROM image AS alias. image may include a tag.
func (*Dockerfile) FromAsPlatform ¶
func (d *Dockerfile) FromAsPlatform(platform, image, alias string) *Dockerfile
FromAsPlatform sets FROM --platform=platform image AS alias.
func (*Dockerfile) FromPlatform ¶
func (d *Dockerfile) FromPlatform(platform, image string, tag ...string) *Dockerfile
FromPlatform sets FROM --platform=platform.
func (*Dockerfile) HealthCheck ¶
func (d *Dockerfile) HealthCheck(opts ...HealthOption) *Dockerfile
HealthCheck sets a HEALTHCHECK instruction from nested HealthOption setters.
func (*Dockerfile) HealthCheckNone ¶
func (d *Dockerfile) HealthCheckNone() *Dockerfile
HealthCheckNone sets HEALTHCHECK NONE.
func (*Dockerfile) Label ¶
func (d *Dockerfile) Label(key, value string) *Dockerfile
Label sets a LABEL instruction.
func (*Dockerfile) Onbuild ¶
func (d *Dockerfile) Onbuild(cmd string) *Dockerfile
Onbuild sets an ONBUILD instruction.
func (*Dockerfile) Run ¶
func (d *Dockerfile) Run(cmd string, opts ...RunOpts) *Dockerfile
Run sets a RUN instruction. Consecutive Run calls with no flags are joined with "&& \" into one layer. A call that sets RunOpts starts a new RUN.
func (*Dockerfile) RunArgs ¶
func (d *Dockerfile) RunArgs(args ...string) *Dockerfile
RunArgs continues the previous RUN with newline continuation and no "&&".
func (*Dockerfile) RunLayer ¶
func (d *Dockerfile) RunLayer(cmd string, opts ...RunOpts) *Dockerfile
RunLayer starts a new RUN instruction. Unlike Run, it does not fold into the previous RUN.
func (*Dockerfile) Shell ¶
func (d *Dockerfile) Shell(executable string, args ...string) *Dockerfile
Shell sets the SHELL instruction (JSON exec form).
func (*Dockerfile) StopSignal ¶
func (d *Dockerfile) StopSignal(sig signal.Signal) *Dockerfile
StopSignal sets a STOPSIGNAL instruction.
func (*Dockerfile) String ¶
func (d *Dockerfile) String() string
String returns the dockerfile text.
func (*Dockerfile) Syntax ¶
func (d *Dockerfile) Syntax(frontend string) *Dockerfile
Syntax sets the # syntax= parser directive.
func (*Dockerfile) User ¶
func (d *Dockerfile) User(user string) *Dockerfile
User sets a USER instruction.
func (*Dockerfile) Validate ¶
func (d *Dockerfile) Validate() error
Validate returns any errors recorded while building the dockerfile.
func (*Dockerfile) Volumes ¶
func (d *Dockerfile) Volumes(volumes ...string) *Dockerfile
Volumes sets a VOLUME instruction.
func (*Dockerfile) Workdir ¶
func (d *Dockerfile) Workdir(path string) *Dockerfile
Workdir sets a WORKDIR instruction.
type DockerfilePathOpt ¶ added in v0.8.1
type DockerfilePathOpt struct {
// contains filtered or unexported fields
}
DockerfilePathOpt is the value returned by DockerfilePath. It implements BuildOption and EngineBuildOption.
func DockerfilePath ¶ added in v0.8.1
func DockerfilePath(path string) DockerfilePathOpt
DockerfilePath sets the Dockerfile path on Build and BuildImage.
type DownOnExitOpt ¶ added in v0.8.1
type DownOnExitOpt struct {
// contains filtered or unexported fields
}
DownOnExitOpt is the value returned by DownOnExit. It implements WaitOption.
func DownOnExit ¶ added in v0.8.1
func DownOnExit(v bool) DownOnExitOpt
DownOnExit runs down when a waited container exits.
type DownOption ¶ added in v0.8.1
type DownOption interface {
// contains filtered or unexported methods
}
DownOption configures Compose.Down.
type DriverOptKV ¶ added in v0.8.1
type DriverOptKV struct {
// contains filtered or unexported fields
}
DriverOptKV is the value returned by DriverOpt. It implements ComposeNetOption, ComposeVolOption, EngineNetworkOption, EngineVolumeOption, GPUOption, LogOption, NetworkOption, and VolumeOption.
type DriverValue ¶ added in v0.8.1
type DriverValue struct {
// contains filtered or unexported fields
}
DriverValue is the value returned by Driver. The type is not named DriverOpt because that name is already the DriverOpt setter. It implements ComposeNetOption, ComposeSecretOption, ComposeVolOption, EngineNetworkOption, EngineVolumeOption, GPUOption, LogOption, SecretOption, and VolumeOption.
func Driver ¶ added in v0.8.1
func Driver[T ~string](s T) DriverValue
Driver sets the driver name for logging, devices, GPUs, volumes, networks, or secrets. Known log drivers live in package logdrv; network drivers in netdrv.
type DryRunOpt ¶ added in v0.8.1
type DryRunOpt struct {
// contains filtered or unexported fields
}
DryRunOpt is the value returned by DryRun. It implements ComposerClientOption.
func DryRun ¶ added in v0.8.1
DryRun configures the Compose SDK to plan without applying changes on NewComposer.
type EnableIPv4Opt ¶ added in v0.8.1
type EnableIPv4Opt struct {
// contains filtered or unexported fields
}
EnableIPv4Opt is the value returned by EnableIPv4. It implements ComposeNetOption.
func EnableIPv4 ¶ added in v0.8.1
func EnableIPv4(v bool) EnableIPv4Opt
EnableIPv4 sets Compose network enable_ipv4.
type EnableIPv6Opt ¶ added in v0.8.1
type EnableIPv6Opt struct {
// contains filtered or unexported fields
}
EnableIPv6Opt is the value returned by EnableIPv6. It implements ComposeNetOption.
func EnableIPv6 ¶ added in v0.8.1
func EnableIPv6(v bool) EnableIPv6Opt
EnableIPv6 sets Compose network enable_ipv6.
type EndpointModeOpt ¶ added in v0.8.1
type EndpointModeOpt struct {
// contains filtered or unexported fields
}
EndpointModeOpt is the value returned by EndpointMode. It implements DeployOption.
func EndpointMode ¶ added in v0.8.1
func EndpointMode(s endpoint.Mode) EndpointModeOpt
EndpointMode sets deploy.endpoint_mode inside Deploy.
type EndpointVarOpt ¶ added in v0.8.1
type EndpointVarOpt struct {
// contains filtered or unexported fields
}
EndpointVarOpt is the value returned by EndpointVar. It implements ModelOption.
func EndpointVar ¶ added in v0.8.1
func EndpointVar(s string) EndpointVarOpt
EndpointVar sets models.*.endpoint_var inside Model.
type Engine ¶ added in v0.8.1
type Engine = clienttypes.APIClient
Engine is the full Engine client surface. NewEngine returns one. Callers never import github.com/moby/moby/client: option and result types are aliased in this package. Fluent wrappers on Container and package functions such as ListContainers share the kit setter vocabulary.
type EngineAttachOption ¶ added in v0.8.1
type EngineAttachOption interface {
// contains filtered or unexported methods
}
EngineAttachOption configures AttachContainer.
type EngineBuildCachePruneOption ¶ added in v0.8.1
type EngineBuildCachePruneOption interface {
// contains filtered or unexported methods
}
EngineBuildCachePruneOption configures PruneBuildCache.
type EngineBuildOption ¶ added in v0.8.1
type EngineBuildOption interface {
// contains filtered or unexported methods
}
EngineBuildOption configures BuildImage.
func EngineBuildOptions ¶ added in v0.8.1
func EngineBuildOptions(v any) ([]EngineBuildOption, error)
EngineBuildOptions decodes a plan buildImage option bag.
type EngineCheckpointCreateOption ¶ added in v0.8.1
type EngineCheckpointCreateOption interface {
// contains filtered or unexported methods
}
EngineCheckpointCreateOption configures CreateCheckpoint.
type EngineCheckpointListOption ¶ added in v0.8.1
type EngineCheckpointListOption interface {
// contains filtered or unexported methods
}
EngineCheckpointListOption configures ListCheckpoints.
type EngineCheckpointRemoveOption ¶ added in v0.8.1
type EngineCheckpointRemoveOption interface {
// contains filtered or unexported methods
}
EngineCheckpointRemoveOption configures RemoveCheckpoint.
type EngineCommitOption ¶ added in v0.8.1
type EngineCommitOption interface {
// contains filtered or unexported methods
}
EngineCommitOption configures CommitContainer.
type EngineConfigCreateOption ¶ added in v0.8.1
type EngineConfigCreateOption interface {
// contains filtered or unexported methods
}
EngineConfigCreateOption configures CreateEngineConfig.
type EngineConfigListOption ¶ added in v0.8.1
type EngineConfigListOption interface {
// contains filtered or unexported methods
}
EngineConfigListOption configures ListConfigs.
type EngineConfigUpdateOption ¶ added in v0.8.1
type EngineConfigUpdateOption interface {
// contains filtered or unexported methods
}
EngineConfigUpdateOption configures UpdateEngineConfig.
type EngineContainerListOption ¶ added in v0.8.1
type EngineContainerListOption interface {
// contains filtered or unexported methods
}
EngineContainerListOption configures ListContainers.
type EngineContainerPruneOption ¶ added in v0.8.1
type EngineContainerPruneOption interface {
// contains filtered or unexported methods
}
EngineContainerPruneOption configures PruneContainers.
type EngineCopyFromOption ¶ added in v0.8.1
type EngineCopyFromOption interface {
// contains filtered or unexported methods
}
EngineCopyFromOption configures CopyFrom.
type EngineCopyToOption ¶ added in v0.8.1
type EngineCopyToOption interface {
// contains filtered or unexported methods
}
EngineCopyToOption configures CopyTo.
type EngineCreateOption ¶ added in v0.8.1
type EngineCreateOption interface {
// contains filtered or unexported methods
}
EngineCreateOption configures Container.Create.
type EngineDiskUsageOption ¶ added in v0.8.1
type EngineDiskUsageOption interface {
// contains filtered or unexported methods
}
EngineDiskUsageOption configures DiskUsage.
type EngineEventsOption ¶ added in v0.8.1
type EngineEventsOption interface {
// contains filtered or unexported methods
}
EngineEventsOption configures ListenEvents.
type EngineExecAttachOption ¶ added in v0.8.1
type EngineExecAttachOption interface {
// contains filtered or unexported methods
}
EngineExecAttachOption configures AttachExec.
type EngineExecCreateOption ¶ added in v0.8.1
type EngineExecCreateOption interface {
// contains filtered or unexported methods
}
EngineExecCreateOption configures CreateExec.
type EngineExecResizeOption ¶ added in v0.8.1
type EngineExecResizeOption interface {
// contains filtered or unexported methods
}
EngineExecResizeOption configures ResizeExec.
type EngineExecStartOption ¶ added in v0.8.1
type EngineExecStartOption interface {
// contains filtered or unexported methods
}
EngineExecStartOption configures StartExec.
type EngineImageAttestOption ¶ added in v0.8.1
type EngineImageAttestOption interface {
// contains filtered or unexported methods
}
EngineImageAttestOption configures AttestImage.
type EngineImageHistoryOption ¶ added in v0.8.1
type EngineImageHistoryOption interface {
// contains filtered or unexported methods
}
EngineImageHistoryOption configures HistoryImage.
type EngineImageImportOption ¶ added in v0.8.1
type EngineImageImportOption interface {
// contains filtered or unexported methods
}
EngineImageImportOption configures ImportImage.
type EngineImageInspectOption ¶ added in v0.8.1
type EngineImageInspectOption interface {
// contains filtered or unexported methods
}
EngineImageInspectOption configures InspectImage.
type EngineImageListOption ¶ added in v0.8.1
type EngineImageListOption interface {
// contains filtered or unexported methods
}
EngineImageListOption configures ListImages.
type EngineImageLoadOption ¶ added in v0.8.1
type EngineImageLoadOption interface {
// contains filtered or unexported methods
}
EngineImageLoadOption configures LoadImage.
type EngineImagePruneOption ¶ added in v0.8.1
type EngineImagePruneOption interface {
// contains filtered or unexported methods
}
EngineImagePruneOption configures PruneImages.
type EngineImagePushOption ¶ added in v0.8.1
type EngineImagePushOption interface {
// contains filtered or unexported methods
}
EngineImagePushOption configures PushImage.
type EngineImageRemoveOption ¶ added in v0.8.1
type EngineImageRemoveOption interface {
// contains filtered or unexported methods
}
EngineImageRemoveOption configures RemoveImage.
type EngineImageSaveOption ¶ added in v0.8.1
type EngineImageSaveOption interface {
// contains filtered or unexported methods
}
EngineImageSaveOption configures SaveImages.
type EngineImageSearchOption ¶ added in v0.8.1
type EngineImageSearchOption interface {
// contains filtered or unexported methods
}
EngineImageSearchOption configures SearchImages.
type EngineImageTagOption ¶ added in v0.8.1
type EngineImageTagOption interface {
// contains filtered or unexported methods
}
EngineImageTagOption configures TagImage.
type EngineInspectOption ¶ added in v0.8.1
type EngineInspectOption interface {
// contains filtered or unexported methods
}
EngineInspectOption configures Container.Inspect.
type EngineLoginOption ¶ added in v0.8.1
type EngineLoginOption interface {
// contains filtered or unexported methods
}
EngineLoginOption configures Login.
type EngineNetworkConnectOption ¶ added in v0.8.1
type EngineNetworkConnectOption interface {
// contains filtered or unexported methods
}
EngineNetworkConnectOption configures ConnectNetwork.
type EngineNetworkDisconnectOption ¶ added in v0.8.1
type EngineNetworkDisconnectOption interface {
// contains filtered or unexported methods
}
EngineNetworkDisconnectOption configures DisconnectNetwork.
type EngineNetworkInspectOption ¶ added in v0.8.1
type EngineNetworkInspectOption interface {
// contains filtered or unexported methods
}
EngineNetworkInspectOption configures InspectNetwork.
type EngineNetworkListOption ¶ added in v0.8.1
type EngineNetworkListOption interface {
// contains filtered or unexported methods
}
EngineNetworkListOption configures ListNetworks.
type EngineNetworkOption ¶ added in v0.8.1
type EngineNetworkOption interface {
// contains filtered or unexported methods
}
EngineNetworkOption configures CreateNetwork.
type EngineNetworkPruneOption ¶ added in v0.8.1
type EngineNetworkPruneOption interface {
// contains filtered or unexported methods
}
EngineNetworkPruneOption configures PruneNetworks.
type EngineNodeListOption ¶ added in v0.8.1
type EngineNodeListOption interface {
// contains filtered or unexported methods
}
EngineNodeListOption configures ListNodes.
type EngineNodeRemoveOption ¶ added in v0.8.1
type EngineNodeRemoveOption interface {
// contains filtered or unexported methods
}
EngineNodeRemoveOption configures RemoveNode.
type EngineNodeUpdateOption ¶ added in v0.8.1
type EngineNodeUpdateOption interface {
// contains filtered or unexported methods
}
EngineNodeUpdateOption configures UpdateNode.
type EnginePingOption ¶ added in v0.8.1
type EnginePingOption interface {
// contains filtered or unexported methods
}
EnginePingOption configures Ping.
type EnginePluginCreateOption ¶ added in v0.8.1
type EnginePluginCreateOption interface {
// contains filtered or unexported methods
}
EnginePluginCreateOption configures CreatePlugin.
type EnginePluginDisableOption ¶ added in v0.8.1
type EnginePluginDisableOption interface {
// contains filtered or unexported methods
}
EnginePluginDisableOption configures DisablePlugin.
type EnginePluginEnableOption ¶ added in v0.8.1
type EnginePluginEnableOption interface {
// contains filtered or unexported methods
}
EnginePluginEnableOption configures EnablePlugin.
type EnginePluginInstallOption ¶ added in v0.8.1
type EnginePluginInstallOption interface {
// contains filtered or unexported methods
}
EnginePluginInstallOption configures InstallPlugin.
type EnginePluginListOption ¶ added in v0.8.1
type EnginePluginListOption interface {
// contains filtered or unexported methods
}
EnginePluginListOption configures ListPlugins.
type EnginePluginPushOption ¶ added in v0.8.1
type EnginePluginPushOption interface {
// contains filtered or unexported methods
}
EnginePluginPushOption configures PushPlugin.
type EnginePluginRemoveOption ¶ added in v0.8.1
type EnginePluginRemoveOption interface {
// contains filtered or unexported methods
}
EnginePluginRemoveOption configures RemovePlugin.
type EnginePluginSetOption ¶ added in v0.8.1
type EnginePluginSetOption interface {
// contains filtered or unexported methods
}
EnginePluginSetOption configures SetPlugin.
type EnginePluginUpgradeOption ¶ added in v0.8.1
type EnginePluginUpgradeOption interface {
// contains filtered or unexported methods
}
EnginePluginUpgradeOption configures UpgradePlugin.
type EnginePullOption ¶ added in v0.8.1
type EnginePullOption interface {
// contains filtered or unexported methods
}
EnginePullOption configures PullImage.
type EngineRenameOption ¶ added in v0.8.1
type EngineRenameOption interface {
// contains filtered or unexported methods
}
EngineRenameOption configures RenameContainer.
type EngineResizeOption ¶ added in v0.8.1
type EngineResizeOption interface {
// contains filtered or unexported methods
}
EngineResizeOption configures ResizeContainer.
type EngineSecretCreateOption ¶ added in v0.8.1
type EngineSecretCreateOption interface {
// contains filtered or unexported methods
}
EngineSecretCreateOption configures CreateEngineSecret.
type EngineSecretListOption ¶ added in v0.8.1
type EngineSecretListOption interface {
// contains filtered or unexported methods
}
EngineSecretListOption configures ListSecrets.
type EngineSecretUpdateOption ¶ added in v0.8.1
type EngineSecretUpdateOption interface {
// contains filtered or unexported methods
}
EngineSecretUpdateOption configures UpdateEngineSecret.
type EngineServiceCreateOption ¶ added in v0.8.1
type EngineServiceCreateOption interface {
// contains filtered or unexported methods
}
EngineServiceCreateOption configures CreateSwarmService.
type EngineServiceListOption ¶ added in v0.8.1
type EngineServiceListOption interface {
// contains filtered or unexported methods
}
EngineServiceListOption configures ListSwarmServices.
type EngineServiceLogsOption ¶ added in v0.8.1
type EngineServiceLogsOption interface {
// contains filtered or unexported methods
}
EngineServiceLogsOption configures SwarmServiceLogs.
type EngineServiceUpdateOption ¶ added in v0.8.1
type EngineServiceUpdateOption interface {
// contains filtered or unexported methods
}
EngineServiceUpdateOption configures UpdateSwarmService.
type EngineStartOption ¶ added in v0.8.1
type EngineStartOption interface {
// contains filtered or unexported methods
}
EngineStartOption configures Container.Start.
type EngineStatPathOption ¶ added in v0.8.1
type EngineStatPathOption interface {
// contains filtered or unexported methods
}
EngineStatPathOption configures StatPath.
type EngineStatsOption ¶ added in v0.8.1
type EngineStatsOption interface {
// contains filtered or unexported methods
}
EngineStatsOption configures StatsContainer.
type EngineStopOption ¶ added in v0.8.1
type EngineStopOption interface {
// contains filtered or unexported methods
}
EngineStopOption configures Container.Stop and Container.Restart.
type EngineSwarmInitOption ¶ added in v0.8.1
type EngineSwarmInitOption interface {
// contains filtered or unexported methods
}
EngineSwarmInitOption configures InitSwarm.
type EngineSwarmJoinOption ¶ added in v0.8.1
type EngineSwarmJoinOption interface {
// contains filtered or unexported methods
}
EngineSwarmJoinOption configures JoinSwarm.
type EngineSwarmLeaveOption ¶ added in v0.8.1
type EngineSwarmLeaveOption interface {
// contains filtered or unexported methods
}
EngineSwarmLeaveOption configures LeaveSwarm.
type EngineSwarmUnlockOption ¶ added in v0.8.1
type EngineSwarmUnlockOption interface {
// contains filtered or unexported methods
}
EngineSwarmUnlockOption configures UnlockSwarm.
type EngineSwarmUpdateOption ¶ added in v0.8.1
type EngineSwarmUpdateOption interface {
// contains filtered or unexported methods
}
EngineSwarmUpdateOption configures UpdateSwarm.
type EngineTaskListOption ¶ added in v0.8.1
type EngineTaskListOption interface {
// contains filtered or unexported methods
}
EngineTaskListOption configures ListTasks.
type EngineTaskLogsOption ¶ added in v0.8.1
type EngineTaskLogsOption interface {
// contains filtered or unexported methods
}
EngineTaskLogsOption configures TaskLogs.
type EngineTopOption ¶ added in v0.8.1
type EngineTopOption interface {
// contains filtered or unexported methods
}
EngineTopOption configures TopContainer.
type EngineUpdateOption ¶ added in v0.8.1
type EngineUpdateOption interface {
// contains filtered or unexported methods
}
EngineUpdateOption configures UpdateContainer.
type EngineVolumeListOption ¶ added in v0.8.1
type EngineVolumeListOption interface {
// contains filtered or unexported methods
}
EngineVolumeListOption configures ListEngineVolumes.
type EngineVolumeOption ¶ added in v0.8.1
type EngineVolumeOption interface {
// contains filtered or unexported methods
}
EngineVolumeOption configures CreateVolume.
type EngineVolumePruneOption ¶ added in v0.8.1
type EngineVolumePruneOption interface {
// contains filtered or unexported methods
}
EngineVolumePruneOption configures PruneVolumes.
type EngineVolumeRemoveOption ¶ added in v0.8.1
type EngineVolumeRemoveOption interface {
// contains filtered or unexported methods
}
EngineVolumeRemoveOption configures RemoveVolume.
type EngineVolumeUpdateOption ¶ added in v0.8.1
type EngineVolumeUpdateOption interface {
// contains filtered or unexported methods
}
EngineVolumeUpdateOption configures UpdateVolume.
type EngineWaitOption ¶ added in v0.8.1
type EngineWaitOption interface {
// contains filtered or unexported methods
}
EngineWaitOption configures Container.Wait.
type EntitlementOpt ¶ added in v0.8.1
type EntitlementOpt struct {
// contains filtered or unexported fields
}
EntitlementOpt is the value returned by Entitlement. It implements BuildOption.
func Entitlement ¶ added in v0.8.1
func Entitlement(s string) EntitlementOpt
Entitlement adds a build entitlement inside Build.
type EntrypointOpt ¶ added in v0.8.1
type EntrypointOpt struct {
// contains filtered or unexported fields
}
EntrypointOpt is the value returned by Entrypoint. It implements ContainerOption, JobOption, RunOption, and ServiceOption.
func Entrypoint ¶ added in v0.8.1
func Entrypoint(cmd ...string) EntrypointOpt
Entrypoint sets the entrypoint (argv).
type EnvFileOpt ¶ added in v0.8.1
type EnvFileOpt struct {
// contains filtered or unexported fields
}
EnvFileOpt is the value returned by EnvFile. It implements IncludeOption, JobOption, LoadProjectOption, and ServiceOption.
func EnvFile ¶ added in v0.8.1
func EnvFile(path string, opts ...EnvFileOption) EnvFileOpt
EnvFile adds a Compose env_file path. Service, job, AddInclude, and LoadProject.
type EnvFileOption ¶ added in v0.8.1
type EnvFileOption interface {
// contains filtered or unexported methods
}
EnvFileOption configures long-syntax env_file attributes inside EnvFile.
type EnvOpt ¶ added in v0.8.1
type EnvOpt struct {
// contains filtered or unexported fields
}
EnvOpt is the value returned by Env. It implements BuildOption, ComposeBuildOption, ComposeCreateOption, ContainerOption, EngineBuildOption, EngineServiceCreateOption, EngineServiceUpdateOption, HookOption, ImportOption, JobOption, RunOption, ServiceOption, UpOption, WatchOption, and WatchTriggerOption.
func Env ¶ added in v0.8.1
Env adds an environment variable at the outer scope, a build-arg inside Build or Compose.Build, or a run-time variable on Compose.Run. The value is treated as secret in errors.
type Error ¶ added in v0.8.1
type Error struct {
Receiver string
Path string
Setting string
// contains filtered or unexported fields
}
Error identifies the receiving object, operation, and resource. SDK failures are classified onto ErrNotFound and the other sentinels so errors.Is / errors.As work without importing Engine or Compose. Secret values are redacted. Unwrap preserves the original cause.
func (*Error) Class ¶ added in v0.8.1
Class is the SDK error class (ErrNotFound, ErrConflict, …).
func (*Error) Format ¶ added in v0.8.1
Format renders a one-line error, or a multi-line dump with %+v.
func (*Error) Hint ¶ added in v0.8.1
Hint is a short debugging note for %+v / Error.Hint.
func (*Error) StatusCode ¶ added in v0.8.1
StatusCode is the HTTP status implied by the class, when known.
type ErrorResponse ¶ added in v0.8.1
type ErrorResponse = commontypes.ErrorResponse
Engine and Compose error payloads, aliased so callers never import those SDKs.
type Event ¶ added in v0.8.1
type Event = composeapi.Event
Event is one Compose resource event delivered to EventConsumer.
type EventConsumerOpt ¶ added in v0.8.1
type EventConsumerOpt struct {
// contains filtered or unexported fields
}
EventConsumerOpt is the value returned by EventConsumer. It implements EventsOption.
func EventConsumer ¶ added in v0.8.1
func EventConsumer(fn func(composeapi.Event) error) EventConsumerOpt
EventConsumer receives Compose events from Compose.Events.
type EventsListOptions ¶ added in v0.8.1
type EventsListOptions = clienttypes.EventsListOptions
Remaining Engine client option and result types used by Engine.
type EventsOption ¶ added in v0.8.1
type EventsOption interface {
// contains filtered or unexported methods
}
EventsOption configures Compose.Events.
type EventsResult ¶ added in v0.8.1
type EventsResult = clienttypes.EventsResult
Remaining Engine client option and result types used by Engine.
func ListenEvents ¶ added in v0.8.1
func ListenEvents(ctx context.Context, api Engine, opts ...EngineEventsOption) EventsResult
ListenEvents wraps Engine.Events.
type ExecAttachOptions ¶ added in v0.8.1
type ExecAttachOptions = clienttypes.ExecAttachOptions
Remaining Engine client option and result types used by Engine.
type ExecAttachResult ¶ added in v0.8.1
type ExecAttachResult = clienttypes.ExecAttachResult
Remaining Engine client option and result types used by Engine.
func AttachExec ¶ added in v0.8.1
func AttachExec(ctx context.Context, api Engine, id string, opts ...EngineExecAttachOption) (ExecAttachResult, error)
AttachExec wraps the corresponding Engine client method.
type ExecCreateOptions ¶ added in v0.8.1
type ExecCreateOptions = clienttypes.ExecCreateOptions
Remaining Engine client option and result types used by Engine.
type ExecCreateResult ¶ added in v0.8.1
type ExecCreateResult = clienttypes.ExecCreateResult
Remaining Engine client option and result types used by Engine.
func CreateExec ¶ added in v0.8.1
func CreateExec(ctx context.Context, api Engine, id string, opts ...EngineExecCreateOption) (ExecCreateResult, error)
CreateExec wraps the corresponding Engine client method.
type ExecInspectOptions ¶ added in v0.8.1
type ExecInspectOptions = clienttypes.ExecInspectOptions
Remaining Engine client option and result types used by Engine.
type ExecInspectResult ¶ added in v0.8.1
type ExecInspectResult = clienttypes.ExecInspectResult
Remaining Engine client option and result types used by Engine.
func InspectExec ¶ added in v0.8.1
InspectExec wraps the corresponding Engine client method.
type ExecResizeOptions ¶ added in v0.8.1
type ExecResizeOptions = clienttypes.ExecResizeOptions
Remaining Engine client option and result types used by Engine.
type ExecResizeResult ¶ added in v0.8.1
type ExecResizeResult = clienttypes.ExecResizeResult
Remaining Engine client option and result types used by Engine.
func ResizeExec ¶ added in v0.8.1
func ResizeExec(ctx context.Context, api Engine, id string, opts ...EngineExecResizeOption) (ExecResizeResult, error)
ResizeExec wraps Engine.ExecResize.
type ExecStartOptions ¶ added in v0.8.1
type ExecStartOptions = clienttypes.ExecStartOptions
Remaining Engine client option and result types used by Engine.
type ExecStartResult ¶ added in v0.8.1
type ExecStartResult = clienttypes.ExecStartResult
Remaining Engine client option and result types used by Engine.
func StartExec ¶ added in v0.8.1
func StartExec(ctx context.Context, api Engine, id string, opts ...EngineExecStartOption) (ExecStartResult, error)
StartExec wraps the corresponding Engine client method.
type ExitError ¶ added in v0.8.1
type ExitError struct {
StatusCode int64
WaitExitError
}
ExitError is a WaitResponse error payload as a Go error.
type ExitFromOpt ¶ added in v0.8.1
type ExitFromOpt struct {
// contains filtered or unexported fields
}
ExitFromOpt is the value returned by ExitFrom. It implements ComposeStartOption and UpOption.
func ExitFrom ¶ added in v0.8.1
func ExitFrom(service string) ExitFromOpt
ExitFrom returns the exit code of the named service on up/start.
type ExportOption ¶ added in v0.8.1
type ExportOption interface {
// contains filtered or unexported methods
}
ExportOption configures Compose.Export.
type ExposeOpt ¶ added in v0.8.1
type ExposeOpt struct {
// contains filtered or unexported fields
}
ExposeOpt is the value returned by Expose. It implements ContainerOption, JobOption, and ServiceOption.
type ExtendsFileOpt ¶ added in v0.8.1
type ExtendsFileOpt struct {
// contains filtered or unexported fields
}
ExtendsFileOpt is the value returned by ExtendsFile. It implements ServiceOption.
func ExtendsFile ¶ added in v0.8.1
func ExtendsFile(path string) ExtendsFileOpt
ExtendsFile sets Compose extends.file. Service only.
type ExtendsOpt ¶ added in v0.8.1
type ExtendsOpt struct {
// contains filtered or unexported fields
}
ExtendsOpt is the value returned by Extends. It implements ServiceOption.
func Extends ¶ added in v0.8.1
func Extends(name string) ExtendsOpt
Extends sets Compose extends.service. Service only.
type ExternalLinkOpt ¶ added in v0.8.1
type ExternalLinkOpt struct {
// contains filtered or unexported fields
}
ExternalLinkOpt is the value returned by ExternalLink. It implements ServiceOption.
func ExternalLink ¶ added in v0.8.1
func ExternalLink(name string) ExternalLinkOpt
ExternalLink adds a Compose external_links entry. Service only.
type ExternalOpt ¶ added in v0.8.1
type ExternalOpt struct {
// contains filtered or unexported fields
}
ExternalOpt is the value returned by External. It implements ComposeFileOption, ComposeNetOption, ComposeSecretOption, ComposeVolOption, FileConfigOption, and SecretOption.
func External ¶ added in v0.8.1
func External(v bool) ExternalOpt
External marks a project network, volume, secret, or config as unmanaged.
type ExtraHostOpt ¶ added in v0.8.1
type ExtraHostOpt struct {
// contains filtered or unexported fields
}
ExtraHostOpt is the value returned by ExtraHost. It implements BuildOption, ContainerOption, JobOption, and ServiceOption.
func ExtraHost ¶ added in v0.8.1
func ExtraHost(hostname, ip string) ExtraHostOpt
ExtraHost maps a hostname to an IP inside the container (Engine extra_hosts / Compose extra_hosts). Put it on the service or container. Inside Build it maps to compose build.extra_hosts.
<ExtraHost hostname="db" ip="10.0.0.2" />
type FailureActionOpt ¶ added in v0.8.1
type FailureActionOpt struct {
// contains filtered or unexported fields
}
FailureActionOpt is the value returned by FailureAction. It implements UpdateOption.
func FailureAction ¶ added in v0.8.1
func FailureAction(s failact.Action) FailureActionOpt
FailureAction sets update/rollback failure_action.
type FileConfigOpt ¶ added in v0.8.1
type FileConfigOpt struct {
// contains filtered or unexported fields
}
FileConfigOpt is the value returned by FileConfig. It implements JobOption and ServiceOption.
func FileConfig ¶ added in v0.8.1
func FileConfig(opts ...FileConfigOption) FileConfigOpt
FileConfig adds a Compose config-file reference on a service/job. Named FileConfig because Config is the Engine portable config type.
type FileConfigOption ¶ added in v0.8.1
type FileConfigOption interface {
// contains filtered or unexported methods
}
FileConfigOption configures a nested Compose config-file reference or definition.
type FileModeOpt ¶ added in v0.8.1
type FileModeOpt struct {
// contains filtered or unexported fields
}
FileModeOpt is the value returned by FileMode. It implements FileConfigOption, SecretOption, and VolumeOption.
func FileMode ¶ added in v0.8.1
func FileMode(m uint32) FileModeOpt
FileMode sets tmpfs/secret/config mode (octal file bits).
type FileOpt ¶ added in v0.8.1
type FileOpt struct {
// contains filtered or unexported fields
}
FileOpt is the value returned by File. It implements ImportOption and LoadProjectOption.
func File ¶ added in v0.8.1
File adds a compose YAML path on ImportFile / LoadProject. Secret and config content use FromFile. A Dockerfile path uses DockerfilePath. An export archive uses OutputFile.
type FilterOpt ¶ added in v0.8.1
type FilterOpt struct {
// contains filtered or unexported fields
}
FilterOpt is the value returned by Filter. It implements EngineBuildCachePruneOption, EngineConfigListOption, EngineContainerListOption, EngineContainerPruneOption, EngineEventsOption, EngineImageListOption, EngineImagePruneOption, EngineImageSearchOption, EngineNetworkListOption, EngineNetworkPruneOption, EngineNodeListOption, EnginePluginListOption, EngineSecretListOption, EngineServiceListOption, EngineTaskListOption, EngineVolumeListOption, and EngineVolumePruneOption.
type Filters ¶ added in v0.8.1
type Filters = clienttypes.Filters
Remaining Engine client option and result types used by Engine.
type FollowLinkOpt ¶ added in v0.8.1
type FollowLinkOpt struct {
// contains filtered or unexported fields
}
FollowLinkOpt is the value returned by FollowLink. It implements CopyOption.
func FollowLink ¶ added in v0.8.1
func FollowLink(v bool) FollowLinkOpt
FollowLink follows symlinks on Compose.Copy.
type FollowOpt ¶ added in v0.8.1
type FollowOpt struct {
// contains filtered or unexported fields
}
FollowOpt is the value returned by Follow. It implements EngineServiceLogsOption, EngineTaskLogsOption, and LogsOption.
type ForceNegotiateOpt ¶ added in v0.8.1
type ForceNegotiateOpt struct {
// contains filtered or unexported fields
}
ForceNegotiateOpt is the value returned by ForceNegotiate. It implements EnginePingOption.
func ForceNegotiate ¶ added in v0.8.1
func ForceNegotiate(v bool) ForceNegotiateOpt
ForceNegotiate re-negotiates the Engine API version on Ping, including explicit false.
type ForceNewClusterOpt ¶ added in v0.8.1
type ForceNewClusterOpt struct {
// contains filtered or unexported fields
}
ForceNewClusterOpt is the value returned by ForceNewCluster. It implements EngineSwarmInitOption.
func ForceNewCluster ¶ added in v0.8.1
func ForceNewCluster(v bool) ForceNewClusterOpt
ForceNewCluster forces a new cluster from the current state on InitSwarm.
type ForceOpt ¶ added in v0.8.1
type ForceOpt struct {
// contains filtered or unexported fields
}
ForceOpt is the value returned by Force. It implements EngineBuildOption, EngineImageRemoveOption, EngineNetworkDisconnectOption, EngineNodeRemoveOption, EnginePluginDisableOption, EnginePluginRemoveOption, EngineSwarmLeaveOption, EngineVolumeRemoveOption, and RemoveOption.
type FormatOpt ¶ added in v0.8.1
type FormatOpt struct {
// contains filtered or unexported fields
}
FormatOpt is the value returned by Format. It implements EnvFileOption.
type FromContainerOpt ¶ added in v0.8.1
type FromContainerOpt struct {
// contains filtered or unexported fields
}
FromContainerOpt is the value returned by FromContainer. It implements ServiceOption.
func FromContainer ¶ added in v0.8.1
func FromContainer(c *Container) FromContainerOpt
FromContainer copies compatible container options onto a Compose service. Engine-only settings such as AutoRemove are reported as unsupported mappings. Passing a *Container directly to NewService is equivalent.
type FromEnvOpt ¶ added in v0.8.1
type FromEnvOpt struct{}
FromEnvOpt is the value returned by FromEnv. It implements ClientOption and ComposerClientOption.
func FromEnv ¶ added in v0.8.1
func FromEnv() FromEnvOpt
FromEnv configures the Engine client from DOCKER_HOST, DOCKER_API_VERSION, DOCKER_CERT_PATH, and DOCKER_TLS_VERIFY.
type FromFileOpt ¶ added in v0.8.1
type FromFileOpt struct {
// contains filtered or unexported fields
}
FromFileOpt is the value returned by FromFile. It implements ComposeFileOption, ComposeSecretOption, FileConfigOption, and SecretOption.
func FromFile ¶ added in v0.8.1
func FromFile(path string) FromFileOpt
FromFile sets the filesystem source of a secret or config object.
type GIDOpt ¶ added in v0.8.1
type GIDOpt struct {
// contains filtered or unexported fields
}
GIDOpt is the value returned by GID. It implements FileConfigOption and SecretOption.
type GPUOpt ¶ added in v0.8.1
type GPUOpt struct {
// contains filtered or unexported fields
}
GPUOpt is the value returned by GPU. It implements ContainerOption, DeployOption, JobOption, ReserveOption, and ServiceOption.
type GPUOption ¶ added in v0.8.1
type GPUOption interface {
// contains filtered or unexported methods
}
GPUOption configures a nested GPU device request.
type GatewayOpt ¶ added in v0.8.1
type GatewayOpt struct {
// contains filtered or unexported fields
}
GatewayOpt is the value returned by Gateway. It implements ComposeNetOption.
func Gateway ¶ added in v0.8.1
func Gateway(g string) GatewayOpt
Gateway sets the gateway of a project network, such as 10.0.0.1. Put it on the Network element under Compose, next to subnet.
type GatewayPriorityOpt ¶ added in v0.8.1
type GatewayPriorityOpt struct {
// contains filtered or unexported fields
}
GatewayPriorityOpt is the value returned by GatewayPriority. It implements NetworkOption.
func GatewayPriority ¶ added in v0.8.1
func GatewayPriority(n int) GatewayPriorityOpt
GatewayPriority sets Compose networks.gw_priority inside Network.
type GenerateOption ¶ added in v0.8.1
type GenerateOption interface {
// contains filtered or unexported methods
}
GenerateOption configures Generate.
type Grouped ¶ added in v0.8.1
type Grouped struct {
// contains filtered or unexported fields
}
Grouped is a bundle of setters produced by package logic. It implements every option interface so Group/When/Each can be passed anywhere a setter is accepted.
func GroupedOnlyIf ¶ added in v0.8.1
GroupedOnlyIf applies opts when check returns true and no error.
func GroupedSet ¶ added in v0.8.1
GroupedSet bundles setters applied together (errors joined).
func GroupedSwitch ¶ added in v0.8.1
GroupedSwitch applies the first case whose predicate is true.
func GroupedWhen ¶ added in v0.8.1
GroupedWhen applies opts when pred is true.
func GroupedWhenElse ¶ added in v0.8.1
GroupedWhenElse applies thenOpts when pred is true and elseOpts otherwise.
type HTTPClientOpt ¶ added in v0.8.1
type HTTPClientOpt struct {
// contains filtered or unexported fields
}
HTTPClientOpt is the value returned by HTTPClient. It implements ClientOption and ComposerClientOption.
func HTTPClient ¶ added in v0.8.1
func HTTPClient(c *http.Client) HTTPClientOpt
HTTPClient sets the HTTP client used to reach the daemon.
type HTTPHeaderOpt ¶ added in v0.8.1
type HTTPHeaderOpt struct {
// contains filtered or unexported fields
}
HTTPHeaderOpt is the value returned by HTTPHeader. It implements ClientOption and ComposerClientOption.
func HTTPHeader ¶ added in v0.8.1
func HTTPHeader(key, value string) HTTPHeaderOpt
HTTPHeader adds a custom HTTP header on Engine requests.
type HTTPRequestHookOpt ¶ added in v0.8.1
type HTTPRequestHookOpt struct {
// contains filtered or unexported fields
}
HTTPRequestHookOpt is the value returned by HTTPRequestHook. It implements ClientOption and ComposerClientOption.
func HTTPRequestHook ¶ added in v0.8.1
func HTTPRequestHook(fn func(*http.Request) error) HTTPRequestHookOpt
HTTPRequestHook runs before each Engine HTTP request.
type HTTPResponseHookOpt ¶ added in v0.8.1
type HTTPResponseHookOpt struct {
// contains filtered or unexported fields
}
HTTPResponseHookOpt is the value returned by HTTPResponseHook. It implements ClientOption and ComposerClientOption.
func HTTPResponseHook ¶ added in v0.8.1
func HTTPResponseHook(fn func(*http.Response)) HTTPResponseHookOpt
HTTPResponseHook runs after each Engine HTTP response.
type HardOpt ¶ added in v0.8.1
type HardOpt struct {
// contains filtered or unexported fields
}
HardOpt is the value returned by Hard. It implements UlimitOption.
type HealthOpt ¶ added in v0.8.1
type HealthOpt struct {
// contains filtered or unexported fields
}
HealthOpt is the value returned by Health. It implements ContainerOption and ServiceOption.
func Health ¶
func Health(opts ...HealthOption) HealthOpt
Health configures a healthcheck with nested setters.
type HealthOption ¶ added in v0.8.1
type HealthOption interface {
// contains filtered or unexported methods
}
HealthOption configures a nested Health scope.
type HijackedResponse ¶ added in v0.8.1
type HijackedResponse = clienttypes.HijackedResponse
Remaining Engine client option and result types used by Engine.
type HookOption ¶ added in v0.8.1
type HookOption interface {
// contains filtered or unexported methods
}
HookOption configures a Compose post_start / pre_stop command.
type HostConfig ¶ added in v0.8.1
type HostConfig = containertypes.HostConfig
Container configuration structs used by Container.EngineConfig.
type HostFromEnvOpt ¶ added in v0.8.1
type HostFromEnvOpt struct{}
HostFromEnvOpt is the value returned by HostFromEnv. It implements ClientOption and ComposerClientOption.
func HostFromEnv ¶ added in v0.8.1
func HostFromEnv() HostFromEnvOpt
HostFromEnv sets the daemon URL from DOCKER_HOST.
type HostIPOpt ¶ added in v0.8.1
type HostIPOpt struct {
// contains filtered or unexported fields
}
HostIPOpt is the value returned by HostIP. It implements PortOption.
type HostOpt ¶ added in v0.8.1
type HostOpt struct {
// contains filtered or unexported fields
}
HostOpt is the value returned by Host. It implements ClientOption and ComposerClientOption.
type HostPortOpt ¶ added in v0.8.1
type HostPortOpt struct {
// contains filtered or unexported fields
}
HostPortOpt is the value returned by HostPort. It implements PortOption.
func HostPort ¶ added in v0.8.1
func HostPort(n uint16) HostPortOpt
HostPort sets the host port in a Publish scope. Zero is explicit.
type IPAMDriverOpt ¶ added in v0.8.1
type IPAMDriverOpt struct {
// contains filtered or unexported fields
}
IPAMDriverOpt is the value returned by IPAMDriver. It implements ComposeNetOption.
func IPAMDriver ¶ added in v0.8.1
func IPAMDriver(d string) IPAMDriverOpt
IPAMDriver sets Compose networks.ipam.driver inside AddNetwork.
type IPAMOptKV ¶ added in v0.8.1
type IPAMOptKV struct {
// contains filtered or unexported fields
}
IPAMOptKV is the value returned by IPAMOpt. It implements ComposeNetOption.
func IPAMOpt ¶ added in v0.8.1
IPAMOpt adds Compose networks.ipam.options inside AddNetwork.
type IPRangeOpt ¶ added in v0.8.1
type IPRangeOpt struct {
// contains filtered or unexported fields
}
IPRangeOpt is the value returned by IPRange. It implements ComposeNetOption.
func IPRange ¶ added in v0.8.1
func IPRange(s string) IPRangeOpt
IPRange sets Compose networks.ipam.config.ip_range inside AddNetwork.
type IPv4Opt ¶ added in v0.8.1
type IPv4Opt struct {
// contains filtered or unexported fields
}
IPv4Opt is the value returned by IPv4. It implements NetworkOption.
func IPv4 ¶ added in v0.8.1
IPv4 sets the static IPv4 address of a service, job, or container on one network.
Put it on the Network element inside that service. The Network element under Compose defines the network and does not take this address. The address has to fall inside that network's subnet.
<Network name="backend" ipv4="10.0.0.10" />
type IPv6Opt ¶ added in v0.8.1
type IPv6Opt struct {
// contains filtered or unexported fields
}
IPv6Opt is the value returned by IPv6. It implements NetworkOption.
type IdentityTokenOpt ¶ added in v0.8.1
type IdentityTokenOpt struct {
// contains filtered or unexported fields
}
IdentityTokenOpt is the value returned by IdentityToken. It implements EngineLoginOption.
func IdentityToken ¶ added in v0.8.1
func IdentityToken(s string) IdentityTokenOpt
IdentityToken sets the identity token for Login. The value is treated as secret in errors.
type IgnoreBuildableOpt ¶ added in v0.8.1
type IgnoreBuildableOpt struct {
// contains filtered or unexported fields
}
IgnoreBuildableOpt is the value returned by IgnoreBuildable. It implements PullOption.
func IgnoreBuildable ¶ added in v0.8.1
func IgnoreBuildable(v bool) IgnoreBuildableOpt
IgnoreBuildable skips images that can be built locally on pull.
type IgnoreFailuresOpt ¶ added in v0.8.1
type IgnoreFailuresOpt struct {
// contains filtered or unexported fields
}
IgnoreFailuresOpt is the value returned by IgnoreFailures. It implements PullOption and PushOption.
func IgnoreFailures ¶ added in v0.8.1
func IgnoreFailures(v bool) IgnoreFailuresOpt
IgnoreFailures continues pull/push after errors.
type IgnoreOpt ¶ added in v0.8.1
type IgnoreOpt struct {
// contains filtered or unexported fields
}
IgnoreOpt is the value returned by Ignore. It implements WatchTriggerOption.
func Ignore ¶ added in v0.8.1
Ignore adds a develop.watch ignore glob inside WatchFiles.
type IgnoreOrphansOpt ¶ added in v0.8.1
type IgnoreOrphansOpt struct {
// contains filtered or unexported fields
}
IgnoreOrphansOpt is the value returned by IgnoreOrphans. It implements ComposeCreateOption, RunOption, and UpOption.
func IgnoreOrphans ¶ added in v0.8.1
func IgnoreOrphans(v bool) IgnoreOrphansOpt
IgnoreOrphans leaves containers for undefined services in place.
type ImageAttestationsOption ¶ added in v0.8.1
type ImageAttestationsOption = clienttypes.ImageAttestationsOption
Remaining Engine client option and result types used by Engine.
type ImageAttestationsResult ¶ added in v0.8.1
type ImageAttestationsResult = clienttypes.ImageAttestationsResult
Remaining Engine client option and result types used by Engine.
func AttestImage ¶ added in v0.8.1
func AttestImage(ctx context.Context, api Engine, ref string, opts ...EngineImageAttestOption) (ImageAttestationsResult, error)
AttestImage wraps Engine.ImageAttestations.
type ImageBuildOptions ¶ added in v0.8.1
type ImageBuildOptions = clienttypes.ImageBuildOptions
Engine client option and result types. They alias the Engine SDK so [client.Client] implements Engine without a kit caller importing that SDK.
type ImageBuildResult ¶ added in v0.8.1
type ImageBuildResult = clienttypes.ImageBuildResult
Engine client option and result types. They alias the Engine SDK so [client.Client] implements Engine without a kit caller importing that SDK.
type ImageHistoryOption ¶ added in v0.8.1
type ImageHistoryOption = clienttypes.ImageHistoryOption
Remaining Engine client option and result types used by Engine.
type ImageHistoryResult ¶ added in v0.8.1
type ImageHistoryResult = clienttypes.ImageHistoryResult
Remaining Engine client option and result types used by Engine.
func HistoryImage ¶ added in v0.8.1
func HistoryImage(ctx context.Context, api Engine, ref string, opts ...EngineImageHistoryOption) (ImageHistoryResult, error)
HistoryImage wraps the corresponding Engine client method.
type ImageImportOptions ¶ added in v0.8.1
type ImageImportOptions = clienttypes.ImageImportOptions
Remaining Engine client option and result types used by Engine.
type ImageImportResult ¶ added in v0.8.1
type ImageImportResult = clienttypes.ImageImportResult
Remaining Engine client option and result types used by Engine.
func ImportImage ¶ added in v0.8.1
func ImportImage(ctx context.Context, api Engine, source ImageImportSource, ref string, opts ...EngineImageImportOption) (ImageImportResult, error)
ImportImage wraps the corresponding Engine client method.
type ImageImportSource ¶ added in v0.8.1
type ImageImportSource = clienttypes.ImageImportSource
Remaining Engine client option and result types used by Engine.
type ImageInspectOption ¶ added in v0.8.1
type ImageInspectOption = clienttypes.ImageInspectOption
Remaining Engine client option and result types used by Engine.
type ImageInspectResult ¶ added in v0.8.1
type ImageInspectResult = clienttypes.ImageInspectResult
Remaining Engine client option and result types used by Engine.
func InspectImage ¶ added in v0.8.1
func InspectImage(ctx context.Context, api Engine, ref string, opts ...EngineImageInspectOption) (ImageInspectResult, error)
InspectImage wraps the corresponding Engine client method.
type ImageListOptions ¶ added in v0.8.1
type ImageListOptions = clienttypes.ImageListOptions
Remaining Engine client option and result types used by Engine.
type ImageListResult ¶ added in v0.8.1
type ImageListResult = clienttypes.ImageListResult
Remaining Engine client option and result types used by Engine.
func ListImages ¶ added in v0.8.1
func ListImages(ctx context.Context, api Engine, opts ...EngineImageListOption) (ImageListResult, error)
ListImages wraps the corresponding Engine client method.
type ImageLoadOption ¶ added in v0.8.1
type ImageLoadOption = clienttypes.ImageLoadOption
Remaining Engine client option and result types used by Engine.
type ImageLoadResult ¶ added in v0.8.1
type ImageLoadResult = clienttypes.ImageLoadResult
Remaining Engine client option and result types used by Engine.
func LoadImage ¶ added in v0.8.1
func LoadImage(ctx context.Context, api Engine, input io.Reader, opts ...EngineImageLoadOption) (ImageLoadResult, error)
LoadImage wraps the corresponding Engine client method.
type ImageMandatoryOpt ¶ added in v0.8.1
type ImageMandatoryOpt struct {
// contains filtered or unexported fields
}
ImageMandatoryOpt is the value returned by ImageMandatory. It implements PushOption.
func ImageMandatory ¶ added in v0.8.1
func ImageMandatory(v bool) ImageMandatoryOpt
ImageMandatory fails push when a service has no image name.
type ImageOpt ¶ added in v0.8.1
type ImageOpt struct {
// contains filtered or unexported fields
}
ImageOpt is the value returned by Image. It implements ComposeModelOption, ContainerOption, EngineBuildOption, EngineServiceCreateOption, EngineServiceUpdateOption, JobOption, and ServiceOption.
type ImagePlatformOpt ¶ added in v0.8.1
type ImagePlatformOpt struct {
// contains filtered or unexported fields
}
ImagePlatformOpt is the value returned by ImagePlatform. It implements EngineImageAttestOption, EngineImageHistoryOption, EngineImageInspectOption, EngineImageLoadOption, and EngineImageSaveOption.
func ImagePlatform ¶ added in v0.8.1
func ImagePlatform(p ocispec.Platform) ImagePlatformOpt
ImagePlatform selects a platform for image inspect, history, load, save, or attestations.
type ImagePruneOptions ¶ added in v0.8.1
type ImagePruneOptions = clienttypes.ImagePruneOptions
Remaining Engine client option and result types used by Engine.
type ImagePruneResult ¶ added in v0.8.1
type ImagePruneResult = clienttypes.ImagePruneResult
Remaining Engine client option and result types used by Engine.
func PruneImages ¶ added in v0.8.1
func PruneImages(ctx context.Context, api Engine, opts ...EngineImagePruneOption) (ImagePruneResult, error)
PruneImages wraps the corresponding Engine client method.
type ImagePullOptions ¶ added in v0.8.1
type ImagePullOptions = clienttypes.ImagePullOptions
Engine client option and result types. They alias the Engine SDK so [client.Client] implements Engine without a kit caller importing that SDK.
type ImagePullResponse ¶ added in v0.8.1
type ImagePullResponse = clienttypes.ImagePullResponse
Engine client option and result types. They alias the Engine SDK so [client.Client] implements Engine without a kit caller importing that SDK.
type ImagePushOptions ¶ added in v0.8.1
type ImagePushOptions = clienttypes.ImagePushOptions
Remaining Engine client option and result types used by Engine.
type ImagePushResponse ¶ added in v0.8.1
type ImagePushResponse = clienttypes.ImagePushResponse
Remaining Engine client option and result types used by Engine.
type ImageRemoveOptions ¶ added in v0.8.1
type ImageRemoveOptions = clienttypes.ImageRemoveOptions
Remaining Engine client option and result types used by Engine.
type ImageRemoveResult ¶ added in v0.8.1
type ImageRemoveResult = clienttypes.ImageRemoveResult
Remaining Engine client option and result types used by Engine.
func RemoveImage ¶ added in v0.8.1
func RemoveImage(ctx context.Context, api Engine, ref string, opts ...EngineImageRemoveOption) (ImageRemoveResult, error)
RemoveImage wraps the corresponding Engine client method.
type ImageSaveOption ¶ added in v0.8.1
type ImageSaveOption = clienttypes.ImageSaveOption
Remaining Engine client option and result types used by Engine.
type ImageSaveResult ¶ added in v0.8.1
type ImageSaveResult = clienttypes.ImageSaveResult
Remaining Engine client option and result types used by Engine.
func SaveImages ¶ added in v0.8.1
func SaveImages(ctx context.Context, api Engine, refs []string, opts ...EngineImageSaveOption) (ImageSaveResult, error)
SaveImages wraps the corresponding Engine client method.
type ImageSearchOptions ¶ added in v0.8.1
type ImageSearchOptions = clienttypes.ImageSearchOptions
Remaining Engine client option and result types used by Engine.
type ImageSearchResult ¶ added in v0.8.1
type ImageSearchResult = clienttypes.ImageSearchResult
Remaining Engine client option and result types used by Engine.
func SearchImages ¶ added in v0.8.1
func SearchImages(ctx context.Context, api Engine, term string, opts ...EngineImageSearchOption) (ImageSearchResult, error)
SearchImages wraps the corresponding Engine client method.
type ImageTagOptions ¶ added in v0.8.1
type ImageTagOptions = clienttypes.ImageTagOptions
Remaining Engine client option and result types used by Engine.
type ImageTagResult ¶ added in v0.8.1
type ImageTagResult = clienttypes.ImageTagResult
Remaining Engine client option and result types used by Engine.
func TagImage ¶ added in v0.8.1
func TagImage(ctx context.Context, api Engine, opts ...EngineImageTagOption) (ImageTagResult, error)
TagImage wraps the corresponding Engine client method.
type ImagesOpt ¶ added in v0.8.1
type ImagesOpt struct {
// contains filtered or unexported fields
}
ImagesOpt is the value returned by Images. It implements EngineDiskUsageOption.
type ImagesOption ¶ added in v0.8.1
type ImagesOption interface {
// contains filtered or unexported methods
}
ImagesOption configures Compose.Images.
type ImportOption ¶ added in v0.8.1
type ImportOption interface {
// contains filtered or unexported methods
}
ImportOption configures ImportYAML, ImportFile, and Import.
type IncludeImageOpt ¶ added in v0.8.1
type IncludeImageOpt struct {
// contains filtered or unexported fields
}
IncludeImageOpt is the value returned by IncludeImage. It implements VizOption.
func IncludeImage ¶ added in v0.8.1
func IncludeImage(v bool) IncludeImageOpt
IncludeImage includes image names in Compose.Viz.
type IncludeNetworksOpt ¶ added in v0.8.1
type IncludeNetworksOpt struct {
// contains filtered or unexported fields
}
IncludeNetworksOpt is the value returned by IncludeNetworks. It implements VizOption.
func IncludeNetworks ¶ added in v0.8.1
func IncludeNetworks(v bool) IncludeNetworksOpt
IncludeNetworks includes network names in Compose.Viz.
type IncludeOpt ¶ added in v0.8.1
type IncludeOpt struct {
// contains filtered or unexported fields
}
IncludeOpt is the value returned by Include. It implements WatchTriggerOption.
func Include ¶ added in v0.8.1
func Include(p string) IncludeOpt
Include adds a develop.watch include glob inside WatchFiles.
type IncludeOption ¶ added in v0.8.1
type IncludeOption interface {
// contains filtered or unexported methods
}
IncludeOption configures a top-level Compose AddInclude entry.
type IncludePortsOpt ¶ added in v0.8.1
type IncludePortsOpt struct {
// contains filtered or unexported fields
}
IncludePortsOpt is the value returned by IncludePorts. It implements VizOption.
func IncludePorts ¶ added in v0.8.1
func IncludePorts(v bool) IncludePortsOpt
IncludePorts includes published ports in Compose.Viz.
type IncludeSizeOpt ¶ added in v0.8.1
type IncludeSizeOpt struct {
// contains filtered or unexported fields
}
IncludeSizeOpt is the value returned by IncludeSize. It implements EngineContainerListOption and EngineInspectOption.
func IncludeSize ¶ added in v0.8.1
func IncludeSize(v bool) IncludeSizeOpt
IncludeSize includes filesystem size on inspect.
type IndentOpt ¶ added in v0.8.1
type IndentOpt struct {
// contains filtered or unexported fields
}
IndentOpt is the value returned by Indent. It implements VizOption.
func Indent ¶ added in v0.8.1
Indent sets graphviz indentation for Compose.Viz.
type IndexOpt ¶ added in v0.8.1
type IndexOpt struct {
// contains filtered or unexported fields
}
IndexOpt is the value returned by Index. It implements AttachOption, CommitOption, ComposePortOption, CopyOption, ExportOption, LogsOption, and RunOption.
type InfoOptions ¶ added in v0.8.1
type InfoOptions = clienttypes.InfoOptions
Remaining Engine client option and result types used by Engine.
type InheritOpt ¶ added in v0.8.1
type InheritOpt struct {
// contains filtered or unexported fields
}
InheritOpt is the value returned by Inherit. It implements ComposeCreateOption, RunOption, and UpOption.
func Inherit ¶ added in v0.8.1
func Inherit(v bool) InheritOpt
Inherit reuses anonymous volumes from the previous container.
type InitialSyncOpt ¶ added in v0.8.1
type InitialSyncOpt struct {
// contains filtered or unexported fields
}
InitialSyncOpt is the value returned by InitialSync. It implements WatchTriggerOption.
func InitialSync ¶ added in v0.8.1
func InitialSync(v bool) InitialSyncOpt
InitialSync sets Compose develop.watch.initial_sync inside WatchFiles.
type InsecureRegistryOpt ¶ added in v0.8.1
type InsecureRegistryOpt struct {
// contains filtered or unexported fields
}
InsecureRegistryOpt is the value returned by InsecureRegistry. It implements LoadProjectOption.
func InsecureRegistry ¶ added in v0.8.1
func InsecureRegistry(host string) InsecureRegistryOpt
InsecureRegistry adds an OCI insecure registry on LoadProject.
type InteractiveOpt ¶ added in v0.8.1
type InteractiveOpt struct {
// contains filtered or unexported fields
}
InteractiveOpt is the value returned by Interactive. It implements ContainerOption, JobOption, RunOption, and ServiceOption.
func Interactive ¶ added in v0.8.1
func Interactive(v bool) InteractiveOpt
Interactive opens stdin, including explicit false.
type InterfaceNameOpt ¶ added in v0.8.1
type InterfaceNameOpt struct {
// contains filtered or unexported fields
}
InterfaceNameOpt is the value returned by InterfaceName. It implements NetworkOption.
func InterfaceName ¶ added in v0.8.1
func InterfaceName(s string) InterfaceNameOpt
InterfaceName sets Compose networks.interface_name inside Network.
type InternalOpt ¶ added in v0.8.1
type InternalOpt struct {
// contains filtered or unexported fields
}
InternalOpt is the value returned by Internal. It implements ComposeNetOption and EngineNetworkOption.
func Internal ¶ added in v0.8.1
func Internal(v bool) InternalOpt
Internal marks a project network as internal.
type IntervalOpt ¶ added in v0.8.1
type IntervalOpt struct {
// contains filtered or unexported fields
}
IntervalOpt is the value returned by Interval. It implements HealthOption.
type InvalidTemplateError ¶ added in v0.8.1
type InvalidTemplateError = templatetypes.InvalidTemplateError
Engine and Compose error payloads, aliased so callers never import those SDKs.
type IsolationOpt ¶ added in v0.8.1
type IsolationOpt struct {
// contains filtered or unexported fields
}
IsolationOpt is the value returned by Isolation. It implements BuildOption, ContainerOption, JobOption, and ServiceOption.
type JSONError ¶ added in v0.8.1
type JSONError = jsonstreamtypes.Error
Engine and Compose error payloads, aliased so callers never import those SDKs.
type Job ¶
type Job struct {
// contains filtered or unexported fields
}
Job is a Compose job: shared spec plus job-only build/secrets/depends.
func (*Job) ComposeConfig ¶ added in v0.8.1
func (j *Job) ComposeConfig() (composetypes.JobConfig, error)
ComposeConfig translates the job into a Compose SDK job config.
type JobOption ¶ added in v0.8.1
type JobOption interface {
// contains filtered or unexported methods
}
JobOption configures a Compose Job.
type JoinTokenOpt ¶ added in v0.8.1
type JoinTokenOpt struct {
// contains filtered or unexported fields
}
JoinTokenOpt is the value returned by JoinToken. It implements EngineSwarmJoinOption.
func JoinToken ¶ added in v0.8.1
func JoinToken(token string) JoinTokenOpt
JoinToken sets the swarm join token for JoinSwarm.
type KeyOpt ¶ added in v0.8.1
type KeyOpt struct {
// contains filtered or unexported fields
}
KeyOpt is the value returned by Key. It implements TLSOption.
type KillOption ¶ added in v0.8.1
type KillOption interface {
// contains filtered or unexported methods
}
KillOption configures Compose.Kill and Container.Kill.
type KindOpt ¶ added in v0.8.1
type KindOpt struct {
// contains filtered or unexported fields
}
KindOpt is the value returned by Kind. It implements VolumeOption.
func Kind ¶ added in v0.8.1
func Kind(k VolumeKind) KindOpt
Kind sets the mount type inside Volume (bind, volume, tmpfs, ...).
type LabelFileOpt ¶ added in v0.8.1
type LabelFileOpt struct {
// contains filtered or unexported fields
}
LabelFileOpt is the value returned by LabelFile. It implements JobOption and ServiceOption.
func LabelFile ¶ added in v0.8.1
func LabelFile(path string) LabelFileOpt
LabelFile adds a Compose label_file path. Service and job only.
type LabelOpt ¶ added in v0.8.1
type LabelOpt struct {
// contains filtered or unexported fields
}
LabelOpt is the value returned by Label. It implements BuildOption, ComposeFileOption, ComposeNetOption, ComposeSecretOption, ComposeVolOption, ContainerOption, DeployOption, EngineBuildOption, EngineConfigCreateOption, EngineConfigUpdateOption, EngineNetworkOption, EngineNodeUpdateOption, EngineSecretCreateOption, EngineSecretUpdateOption, EngineServiceCreateOption, EngineServiceUpdateOption, EngineVolumeOption, FileConfigOption, JobOption, RunOption, SecretOption, ServiceOption, and VolumeOption.
type LimitOpt ¶ added in v0.8.1
type LimitOpt struct {
// contains filtered or unexported fields
}
LimitOpt is the value returned by Limit. It implements EngineContainerListOption and EngineImageSearchOption.
type LinkLocalOpt ¶ added in v0.8.1
type LinkLocalOpt struct {
// contains filtered or unexported fields
}
LinkLocalOpt is the value returned by LinkLocal. It implements NetworkOption.
func LinkLocal ¶ added in v0.8.1
func LinkLocal(ip string) LinkLocalOpt
LinkLocal adds Compose networks.link_local_ips inside Network.
type LinksOpt ¶ added in v0.8.1
type LinksOpt struct {
// contains filtered or unexported fields
}
LinksOpt is the value returned by Links. It implements RemoveOption.
func Links ¶ added in v0.8.1
Links removes specified linked containers with Container.Remove.
type ListOption ¶ added in v0.8.1
type ListOption interface {
// contains filtered or unexported methods
}
ListOption configures List.
type ListenAddrOpt ¶ added in v0.8.1
type ListenAddrOpt struct {
// contains filtered or unexported fields
}
ListenAddrOpt is the value returned by ListenAddr. It implements EngineSwarmInitOption and EngineSwarmJoinOption.
func ListenAddr ¶ added in v0.8.1
func ListenAddr(addr string) ListenAddrOpt
ListenAddr sets the swarm listen address (for example 0.0.0.0:2377).
type LoadListener ¶ added in v0.8.1
type LoadListener = composeapi.LoadListener
Compose SDK types used by LoadProject, ConsumeLogs, and EventConsumer so callers never import compose/v5.
type LoadProjectOption ¶ added in v0.8.1
type LoadProjectOption interface {
// contains filtered or unexported methods
}
LoadProjectOption configures LoadProject.
type Loaded ¶ added in v0.8.1
type Loaded struct {
Project *Project
// contains filtered or unexported fields
}
Loaded is a compose-go project bound to the Client that loaded it.
type LogConsumer ¶ added in v0.8.1
type LogConsumer = composeapi.LogConsumer
LogConsumer receives one container's stdout, stderr, and status lines. Implement Log, Err, and Status. ConsumeLogs and Compose.Logs take one.
type LogEvent ¶ added in v0.8.1
type LogEvent struct {
Time time.Time
Kind LogKind
Op string
ID string
Parent string
Text string
Detail string
Current int64
Total int64
Status LogStatus
}
LogEvent is one unified progress or log line from Engine or Compose.
type LogOpt ¶ added in v0.8.1
type LogOpt struct {
// contains filtered or unexported fields
}
LogOpt is the value returned by Log. It implements ComposeBuildOption, ComposeCreateOption, ComposeRestartOption, ComposeStartOption, ComposeStopOption, ComposerClientOption, DownOption, EngineBuildOption, EngineImagePushOption, EnginePullOption, PullOption, PushOption, UpOption, and WatchOption.
type LogOption ¶ added in v0.8.1
type LogOption interface {
// contains filtered or unexported methods
}
LogOption configures a nested Logging scope.
type Logger ¶ added in v0.8.1
type Logger struct {
// contains filtered or unexported fields
}
Logger renders Engine and Compose progress with one vocabulary. It does not use Docker's stock JSON-message printer or Compose TTY writer: JSON streams and Compose events are parsed and formatted here.
In tty mode, pull and build rows stay on a live region at the bottom of the terminal. Working rows show a spinner, byte totals update in place, and a finished row scrolls into the transcript above that region.
Example ¶
package main
import (
"bytes"
"fmt"
"strings"
"github.com/aptd3v/containerkit/pkg/kit"
)
func main() {
var buf bytes.Buffer
log := kit.NewLogger(kit.OutputStream(&buf), kit.Color(false), kit.Progress("plain"))
log.Emit(kit.LogEvent{Kind: kit.KindPull, Op: "downloading", ID: "abc123", Current: 512, Total: 1024, Status: kit.StatusWorking})
log.Emit(kit.LogEvent{Kind: kit.KindPull, Op: "pulled", ID: "alpine:latest", Status: kit.StatusDone})
log.Emit(kit.LogEvent{Kind: kit.KindBuild, Op: "step", ID: "app", Detail: "FROM alpine", Status: kit.StatusWorking})
log.Emit(kit.LogEvent{Kind: kit.KindCompose, Op: "up", ID: "app", Status: kit.StatusDone})
for _, line := range strings.Split(strings.TrimSpace(buf.String()), "\n") {
fmt.Println(strings.Contains(line, "pull") || strings.Contains(line, "build") || strings.Contains(line, "compose"))
}
}
Output: true true true true
func LoggerFrom ¶ added in v0.8.1
LoggerFrom returns the logger Logger.Context attached, or nil.
func NewFrameLogger ¶ added in v0.8.1
NewFrameLogger emits events to sink and does not write a human transcript. The session command uses it so log and status lines become NDJSON frames.
func NewLogger ¶ added in v0.8.1
func NewLogger(opts ...LoggerOption) *Logger
NewLogger constructs a stdout logger. With no options it writes to stderr, auto-detects a TTY, and colors when the destination is a terminal.
func (*Logger) Context ¶ added in v0.8.1
Context attaches this logger to ctx for Engine and Compose actions that honor it.
func (*Logger) Done ¶ added in v0.8.1
Done implements compose EventProcessor. Compose calls this with true when the operation returned an error (the flag is err != nil, not success).
func (*Logger) Emit ¶ added in v0.8.1
Emit renders one event. Nil loggers and quiet working events are skipped.
func (*Logger) On ¶ added in v0.8.1
func (l *Logger) On(events ...composeapi.Resource)
On implements compose EventProcessor.
type LoggerOption ¶ added in v0.8.1
type LoggerOption interface {
// contains filtered or unexported methods
}
LoggerOption configures NewLogger.
type LoggingOpt ¶ added in v0.8.1
type LoggingOpt struct {
// contains filtered or unexported fields
}
LoggingOpt is the value returned by Logging. It implements ContainerOption, JobOption, and ServiceOption.
func Logging ¶ added in v0.8.1
func Logging(opts ...LogOption) LoggingOpt
Logging sets Engine LogConfig / Compose logging.
type LogsOption ¶ added in v0.8.1
type LogsOption interface {
// contains filtered or unexported methods
}
LogsOption configures Compose.Logs and Container.Logs.
type MacAddressOpt ¶ added in v0.8.1
type MacAddressOpt struct {
// contains filtered or unexported fields
}
MacAddressOpt is the value returned by MacAddress. It implements ContainerOption, JobOption, NetworkOption, and ServiceOption.
func MacAddress ¶ added in v0.8.1
func MacAddress(m string) MacAddressOpt
MacAddress sets a MAC address.
On a Service, Job, or Container it is that container's MAC. On a Network child it is the MAC of that one endpoint. Use the Network form when the container joins a network you defined.
<Network name="backend" macAddress="02:42:0a:00:00:0a" />
type ManifestsOpt ¶ added in v0.8.1
type ManifestsOpt struct {
// contains filtered or unexported fields
}
ManifestsOpt is the value returned by Manifests. It implements EngineImageInspectOption.
func Manifests ¶ added in v0.8.1
func Manifests(v bool) ManifestsOpt
Manifests requests image manifests on InspectImage.
type MaskedPathOpt ¶ added in v0.8.1
type MaskedPathOpt struct {
// contains filtered or unexported fields
}
MaskedPathOpt is the value returned by MaskedPath. It implements ContainerOption.
func MaskedPath ¶ added in v0.8.1
func MaskedPath(p string) MaskedPathOpt
MaskedPath overrides a masked path. Engine-only.
type MaxConcurrencyOpt ¶ added in v0.8.1
type MaxConcurrencyOpt struct {
// contains filtered or unexported fields
}
MaxConcurrencyOpt is the value returned by MaxConcurrency. It implements ComposerClientOption.
func MaxConcurrency ¶ added in v0.8.1
func MaxConcurrency(n int) MaxConcurrencyOpt
MaxConcurrency limits concurrent Engine operations on NewComposer.
type MaxFailureRatioOpt ¶ added in v0.8.1
type MaxFailureRatioOpt struct {
// contains filtered or unexported fields
}
MaxFailureRatioOpt is the value returned by MaxFailureRatio. It implements UpdateOption.
func MaxFailureRatio ¶ added in v0.8.1
func MaxFailureRatio(n float32) MaxFailureRatioOpt
MaxFailureRatio sets update/rollback max_failure_ratio.
type MaxReplicasOpt ¶ added in v0.8.1
type MaxReplicasOpt struct {
// contains filtered or unexported fields
}
MaxReplicasOpt is the value returned by MaxReplicas. It implements PlacementOption.
func MaxReplicas ¶ added in v0.8.1
func MaxReplicas(n uint64) MaxReplicasOpt
MaxReplicas sets placement max_replicas_per_node inside Placement.
type MaxRetriesOpt ¶ added in v0.8.1
type MaxRetriesOpt struct {
// contains filtered or unexported fields
}
MaxRetriesOpt is the value returned by MaxRetries. It implements RestartOption.
func MaxRetries ¶ added in v0.8.1
func MaxRetries(n int) MaxRetriesOpt
MaxRetries sets on-failure retry count in a Restart scope. Zero is explicit.
type MemoryOpt ¶ added in v0.8.1
type MemoryOpt struct {
// contains filtered or unexported fields
}
MemoryOpt is the value returned by Memory. It implements BuildOption, ComposeBuildOption, ComposeCreateOption, ContainerOption, DeployOption, EngineBuildOption, JobOption, ReserveOption, ServiceOption, UpOption, and WatchOption.
type MissingRequiredError ¶ added in v0.8.1
type MissingRequiredError = templatetypes.MissingRequiredError
Engine and Compose error payloads, aliased so callers never import those SDKs.
type ModeOpt ¶ added in v0.8.1
type ModeOpt struct {
// contains filtered or unexported fields
}
ModeOpt is the value returned by Mode. It implements DeployOption, EngineServiceCreateOption, EngineServiceUpdateOption, and PortOption.
type ModelOpt ¶ added in v0.8.1
type ModelOpt struct {
// contains filtered or unexported fields
}
ModelOpt is the value returned by Model. It implements JobOption and ServiceOption.
func Model ¶
func Model(opts ...ModelOption) ModelOpt
Model adds a Compose models mapping. Service and job.
type ModelOption ¶ added in v0.8.1
type ModelOption interface {
// contains filtered or unexported methods
}
ModelOption configures a Compose models entry inside Model.
type ModelVarOpt ¶ added in v0.8.1
type ModelVarOpt struct {
// contains filtered or unexported fields
}
ModelVarOpt is the value returned by ModelVar. It implements ModelOption.
func ModelVar ¶ added in v0.8.1
func ModelVar(s string) ModelVarOpt
ModelVar sets models.*.model_var inside Model.
type MonitorOpt ¶ added in v0.8.1
type MonitorOpt struct {
// contains filtered or unexported fields
}
MonitorOpt is the value returned by Monitor. It implements UpdateOption.
func Monitor ¶ added in v0.8.1
func Monitor(d time.Duration) MonitorOpt
Monitor sets update/rollback monitor duration.
type NameOpt ¶ added in v0.8.1
type NameOpt struct {
// contains filtered or unexported fields
}
NameOpt is the value returned by Name. It implements ComposeFileOption, ComposeModelOption, ComposeNetOption, ComposeOption, ComposeSecretOption, ComposeVolOption, ContainerOption, DependOption, EngineConfigCreateOption, EngineConfigUpdateOption, EngineCreateOption, EngineNodeUpdateOption, EnginePluginCreateOption, EnginePluginInstallOption, EnginePluginUpgradeOption, EngineRenameOption, EngineSecretCreateOption, EngineSecretUpdateOption, EngineServiceCreateOption, EngineServiceUpdateOption, EngineVolumeOption, FileConfigOption, GenerateOption, ImportOption, JobOption, LoadProjectOption, ModelOption, NetworkOption, PortOption, RunOption, SecretOption, ServiceOption, UlimitOption, and VolumeOption.
type NavigationMenuOpt ¶ added in v0.8.1
type NavigationMenuOpt struct {
// contains filtered or unexported fields
}
NavigationMenuOpt is the value returned by NavigationMenu. It implements ComposeStartOption and UpOption.
func NavigationMenu ¶ added in v0.8.1
func NavigationMenu(v bool) NavigationMenuOpt
NavigationMenu toggles the compose navigation menu on up/start, including explicit false.
type NegotiateAPIVersionOpt ¶ added in v0.8.1
type NegotiateAPIVersionOpt struct{}
NegotiateAPIVersionOpt is the value returned by NegotiateAPIVersion. It implements ClientOption, ComposerClientOption, and EnginePingOption.
func NegotiateAPIVersion ¶ added in v0.8.1
func NegotiateAPIVersion() NegotiateAPIVersionOpt
NegotiateAPIVersion enables Engine API version negotiation on NewEngine or Ping. The Engine SDK treats the client option as a no-op because negotiation is now the default; on Ping it sets PingOptions.NegotiateAPIVersion.
type NetworkConnectOptions ¶ added in v0.8.1
type NetworkConnectOptions = clienttypes.NetworkConnectOptions
Remaining Engine client option and result types used by Engine.
type NetworkConnectResult ¶ added in v0.8.1
type NetworkConnectResult = clienttypes.NetworkConnectResult
Remaining Engine client option and result types used by Engine.
func ConnectNetwork ¶ added in v0.8.1
func ConnectNetwork(ctx context.Context, api Engine, name string, opts ...EngineNetworkConnectOption) (NetworkConnectResult, error)
ConnectNetwork wraps the corresponding Engine client method.
type NetworkCreateOptions ¶ added in v0.8.1
type NetworkCreateOptions = clienttypes.NetworkCreateOptions
Engine client option and result types. They alias the Engine SDK so [client.Client] implements Engine without a kit caller importing that SDK.
type NetworkCreateResult ¶ added in v0.8.1
type NetworkCreateResult = clienttypes.NetworkCreateResult
Engine client option and result types. They alias the Engine SDK so [client.Client] implements Engine without a kit caller importing that SDK.
func CreateNetwork ¶ added in v0.8.1
func CreateNetwork(ctx context.Context, api Engine, name string, opts ...EngineNetworkOption) (NetworkCreateResult, error)
CreateNetwork creates an Engine network.
type NetworkDisconnectOptions ¶ added in v0.8.1
type NetworkDisconnectOptions = clienttypes.NetworkDisconnectOptions
Remaining Engine client option and result types used by Engine.
type NetworkDisconnectResult ¶ added in v0.8.1
type NetworkDisconnectResult = clienttypes.NetworkDisconnectResult
Remaining Engine client option and result types used by Engine.
func DisconnectNetwork ¶ added in v0.8.1
func DisconnectNetwork(ctx context.Context, api Engine, name string, opts ...EngineNetworkDisconnectOption) (NetworkDisconnectResult, error)
DisconnectNetwork wraps the corresponding Engine client method.
type NetworkInspectOptions ¶ added in v0.8.1
type NetworkInspectOptions = clienttypes.NetworkInspectOptions
Remaining Engine client option and result types used by Engine.
type NetworkInspectResult ¶ added in v0.8.1
type NetworkInspectResult = clienttypes.NetworkInspectResult
Remaining Engine client option and result types used by Engine.
func InspectNetwork ¶ added in v0.8.1
func InspectNetwork(ctx context.Context, api Engine, name string, opts ...EngineNetworkInspectOption) (NetworkInspectResult, error)
InspectNetwork wraps the corresponding Engine client method.
type NetworkListOptions ¶ added in v0.8.1
type NetworkListOptions = clienttypes.NetworkListOptions
Remaining Engine client option and result types used by Engine.
type NetworkListResult ¶ added in v0.8.1
type NetworkListResult = clienttypes.NetworkListResult
Remaining Engine client option and result types used by Engine.
func ListNetworks ¶ added in v0.8.1
func ListNetworks(ctx context.Context, api Engine, opts ...EngineNetworkListOption) (NetworkListResult, error)
ListNetworks wraps the corresponding Engine client method.
type NetworkModeOpt ¶ added in v0.8.1
type NetworkModeOpt struct {
// contains filtered or unexported fields
}
NetworkModeOpt is the value returned by NetworkMode. It implements BuildOption, ContainerOption, JobOption, and ServiceOption.
func NetworkMode ¶ added in v0.8.1
func NetworkMode(mode netmode.Mode) NetworkModeOpt
NetworkMode sets Engine NetworkMode / Compose network_mode (bridge, host, none, container:id). Inside Build it maps to compose build.network.
type NetworkOpt ¶ added in v0.8.1
type NetworkOpt struct {
// contains filtered or unexported fields
}
NetworkOpt is the value returned by Network. It implements ContainerOption, JobOption, and ServiceOption.
func Network ¶ added in v0.8.1
func Network(opts ...NetworkOption) NetworkOpt
Network attaches a named network (Engine EndpointsConfig / Compose networks).
Under Compose it defines the network: driver, subnet, and gateway. Under Service, Job, or Container it joins that network and can set ipv4, ipv6, and macAddress. A static address has to fall inside the subnet of the project network with the same name.
type NetworkOption ¶ added in v0.8.1
type NetworkOption interface {
// contains filtered or unexported methods
}
NetworkOption configures a nested Network attachment.
type NetworkPruneOptions ¶ added in v0.8.1
type NetworkPruneOptions = clienttypes.NetworkPruneOptions
Remaining Engine client option and result types used by Engine.
type NetworkPruneResult ¶ added in v0.8.1
type NetworkPruneResult = clienttypes.NetworkPruneResult
Remaining Engine client option and result types used by Engine.
func PruneNetworks ¶ added in v0.8.1
func PruneNetworks(ctx context.Context, api Engine, opts ...EngineNetworkPruneOption) (NetworkPruneResult, error)
PruneNetworks wraps the corresponding Engine client method.
type NetworkRemoveOptions ¶ added in v0.8.1
type NetworkRemoveOptions = clienttypes.NetworkRemoveOptions
Remaining Engine client option and result types used by Engine.
type NetworkRemoveResult ¶ added in v0.8.1
type NetworkRemoveResult = clienttypes.NetworkRemoveResult
Remaining Engine client option and result types used by Engine.
func RemoveNetwork ¶ added in v0.8.1
RemoveNetwork wraps the corresponding Engine client method.
type NetworkingConfig ¶ added in v0.8.1
type NetworkingConfig = networktypes.NetworkingConfig
Container configuration structs used by Container.EngineConfig.
type NoCacheFilterOpt ¶ added in v0.8.1
type NoCacheFilterOpt struct {
// contains filtered or unexported fields
}
NoCacheFilterOpt is the value returned by NoCacheFilter. It implements BuildOption.
func NoCacheFilter ¶ added in v0.8.1
func NoCacheFilter(s string) NoCacheFilterOpt
NoCacheFilter adds a build no_cache_filter stage inside Build.
type NoCacheOpt ¶ added in v0.8.1
type NoCacheOpt struct {
// contains filtered or unexported fields
}
NoCacheOpt is the value returned by NoCache. It implements BuildOption, ComposeBuildOption, ComposeCreateOption, EngineBuildOption, RunOption, UpOption, and WatchOption.
func NoCache ¶ added in v0.8.1
func NoCache(v bool) NoCacheOpt
NoCache disables layer cache inside Build.
type NoCopyOpt ¶ added in v0.8.1
type NoCopyOpt struct {
// contains filtered or unexported fields
}
NoCopyOpt is the value returned by NoCopy. It implements VolumeOption.
type NoDepsOpt ¶ added in v0.8.1
type NoDepsOpt struct {
// contains filtered or unexported fields
}
NoDepsOpt is the value returned by NoDeps. It implements ComposeRestartOption and RunOption.
type NoStdinOpt ¶ added in v0.8.1
type NoStdinOpt struct {
// contains filtered or unexported fields
}
NoStdinOpt is the value returned by NoStdin. It implements AttachOption.
type Node ¶ added in v0.8.1
type Node = swarmtypes.Node
Remaining Engine client option and result types used by Engine.
type NodeAvailability ¶ added in v0.8.1
type NodeAvailability = swarmtypes.NodeAvailability
Remaining Engine client option and result types used by Engine.
type NodeInspectOptions ¶ added in v0.8.1
type NodeInspectOptions = clienttypes.NodeInspectOptions
Remaining Engine client option and result types used by Engine.
type NodeInspectResult ¶ added in v0.8.1
type NodeInspectResult = clienttypes.NodeInspectResult
Remaining Engine client option and result types used by Engine.
func InspectNode ¶ added in v0.8.1
InspectNode wraps the corresponding Engine client method.
type NodeListOptions ¶ added in v0.8.1
type NodeListOptions = clienttypes.NodeListOptions
Remaining Engine client option and result types used by Engine.
type NodeListResult ¶ added in v0.8.1
type NodeListResult = clienttypes.NodeListResult
Remaining Engine client option and result types used by Engine.
func ListNodes ¶ added in v0.8.1
func ListNodes(ctx context.Context, api Engine, opts ...EngineNodeListOption) (NodeListResult, error)
ListNodes wraps the corresponding Engine client method.
type NodeRemoveOptions ¶ added in v0.8.1
type NodeRemoveOptions = clienttypes.NodeRemoveOptions
Remaining Engine client option and result types used by Engine.
type NodeRemoveResult ¶ added in v0.8.1
type NodeRemoveResult = clienttypes.NodeRemoveResult
Remaining Engine client option and result types used by Engine.
func RemoveNode ¶ added in v0.8.1
func RemoveNode(ctx context.Context, api Engine, id string, opts ...EngineNodeRemoveOption) (NodeRemoveResult, error)
RemoveNode wraps the corresponding Engine client method.
type NodeRole ¶ added in v0.8.1
type NodeRole = swarmtypes.NodeRole
Remaining Engine client option and result types used by Engine.
type NodeSpec ¶ added in v0.8.1
type NodeSpec = swarmtypes.NodeSpec
Remaining Engine client option and result types used by Engine.
type NodeUpdateOptions ¶ added in v0.8.1
type NodeUpdateOptions = clienttypes.NodeUpdateOptions
Remaining Engine client option and result types used by Engine.
type NodeUpdateResult ¶ added in v0.8.1
type NodeUpdateResult = clienttypes.NodeUpdateResult
Remaining Engine client option and result types used by Engine.
func UpdateNode ¶ added in v0.8.1
func UpdateNode(ctx context.Context, api Engine, id string, opts ...EngineNodeUpdateOption) (NodeUpdateResult, error)
UpdateNode wraps Engine.NodeUpdate.
type OCIOpt ¶ added in v0.8.1
type OCIOpt struct {
// contains filtered or unexported fields
}
OCIOpt is the value returned by OCI. It implements PublishOption.
type OCIOptions ¶ added in v0.8.1
type OCIOptions = composeapi.OCIOptions
Compose SDK types used by LoadProject, ConsumeLogs, and EventConsumer so callers never import compose/v5.
type OCIVersion ¶ added in v0.8.1
OCIVersion is a Compose publish OCI manifest version. Known values live in package oci.
type OfflineOpt ¶ added in v0.8.1
type OfflineOpt struct {
// contains filtered or unexported fields
}
OfflineOpt is the value returned by Offline. It implements LoadProjectOption.
func Offline ¶ added in v0.8.1
func Offline(v bool) OfflineOpt
Offline disables remote resource loading on LoadProject.
type OnBuildOpt ¶ added in v0.8.1
type OnBuildOpt struct {
// contains filtered or unexported fields
}
OnBuildOpt is the value returned by OnBuild. It implements ContainerOption.
func OnBuild ¶ added in v0.8.1
func OnBuild(args ...string) OnBuildOpt
OnBuild adds image ONBUILD metadata. Engine-only.
type OnExitOpt ¶ added in v0.8.1
type OnExitOpt struct {
// contains filtered or unexported fields
}
OnExitOpt is the value returned by OnExit. It implements ComposeStartOption and UpOption.
type OnLoadOpt ¶ added in v0.8.1
type OnLoadOpt struct {
// contains filtered or unexported fields
}
OnLoadOpt is the value returned by OnLoad. It implements LoadProjectOption.
func OnLoad ¶ added in v0.8.1
func OnLoad(fn LoadListener) OnLoadOpt
OnLoad registers a LoadListener on LoadProject.
type OnUnsupportedOpt ¶ added in v0.8.1
type OnUnsupportedOpt struct {
// contains filtered or unexported fields
}
OnUnsupportedOpt is the value returned by OnUnsupported. It implements LoadProjectOption.
func OnUnsupported ¶ added in v0.8.1
func OnUnsupported(fn func([]UnsupportedAttribute)) OnUnsupportedOpt
OnUnsupported is invoked with compose-file attributes the runtime does not honor outside Swarm mode on LoadProject.
type OrderOpt ¶ added in v0.8.1
type OrderOpt struct {
// contains filtered or unexported fields
}
OrderOpt is the value returned by Order. It implements UpdateOption.
type OutputFileOpt ¶ added in v0.8.1
type OutputFileOpt struct {
// contains filtered or unexported fields
}
OutputFileOpt is the value returned by OutputFile. It implements ExportOption.
func OutputFile ¶ added in v0.8.1
func OutputFile(path string) OutputFileOpt
OutputFile sets the archive path for Compose.Export.
type OutputStreamOpt ¶ added in v0.8.1
type OutputStreamOpt struct {
// contains filtered or unexported fields
}
OutputStreamOpt is the value returned by OutputStream. It implements ComposeBuildOption, ComposeCreateOption, ComposerClientOption, LoggerOption, UpOption, and WatchOption.
func OutputStream ¶ added in v0.8.1
func OutputStream(w io.Writer) OutputStreamOpt
OutputStream sets the NewLogger destination or compose build progress writer.
type ParallelismOpt ¶ added in v0.8.1
type ParallelismOpt struct {
// contains filtered or unexported fields
}
ParallelismOpt is the value returned by Parallelism. It implements UpdateOption.
func Parallelism ¶ added in v0.8.1
func Parallelism(n uint64) ParallelismOpt
Parallelism sets update/rollback parallelism.
type PasswordOpt ¶ added in v0.8.1
type PasswordOpt struct {
// contains filtered or unexported fields
}
PasswordOpt is the value returned by Password. It implements EngineLoginOption.
func Password ¶ added in v0.8.1
func Password(s string) PasswordOpt
Password sets the registry password for Login. The value is treated as secret in errors.
type PathOpt ¶ added in v0.8.1
type PathOpt struct {
// contains filtered or unexported fields
}
PathOpt is the value returned by Path. It implements EngineStatPathOption, IncludeOption, and WatchTriggerOption.
type PauseOpt ¶ added in v0.8.1
type PauseOpt struct {
// contains filtered or unexported fields
}
PauseOpt is the value returned by Pause. It implements CommitOption.
func Pause ¶
Pause pauses the container during Compose.Commit, including explicit false.
type PauseOption ¶ added in v0.8.1
type PauseOption interface {
// contains filtered or unexported methods
}
PauseOption configures Compose.Pause and Compose.Unpause.
type PerReplicaOpt ¶ added in v0.8.1
type PerReplicaOpt struct {
// contains filtered or unexported fields
}
PerReplicaOpt is the value returned by PerReplica. It implements ContainerOption.
func PerReplica ¶ added in v0.8.1
func PerReplica(v bool) PerReplicaOpt
PerReplica sets Compose pre_start.per_replica inside PreStart.
type PermsOpt ¶ added in v0.8.1
type PermsOpt struct {
// contains filtered or unexported fields
}
PermsOpt is the value returned by Perms. It implements DeviceOption.
type PidsLimitOpt ¶ added in v0.8.1
type PidsLimitOpt struct {
// contains filtered or unexported fields
}
PidsLimitOpt is the value returned by PidsLimit. It implements ContainerOption, DeployOption, JobOption, ReserveOption, and ServiceOption.
type PingOptions ¶ added in v0.8.1
type PingOptions = clienttypes.PingOptions
Remaining Engine client option and result types used by Engine.
type PingResult ¶ added in v0.8.1
type PingResult = clienttypes.PingResult
Remaining Engine client option and result types used by Engine.
func Ping ¶ added in v0.8.1
func Ping(ctx context.Context, api Engine, opts ...EnginePingOption) (PingResult, error)
Ping wraps the corresponding Engine client method.
type PlacementOpt ¶ added in v0.8.1
type PlacementOpt struct {
// contains filtered or unexported fields
}
PlacementOpt is the value returned by Placement. It implements DeployOption.
func Placement ¶ added in v0.8.1
func Placement(opts ...PlacementOption) PlacementOpt
Placement sets deploy.placement inside Deploy.
type PlacementOption ¶ added in v0.8.1
type PlacementOption interface {
// contains filtered or unexported methods
}
PlacementOption configures nested Placement deploy constraints.
type Plan ¶ added in v0.8.1
type Plan struct {
// contains filtered or unexported fields
}
Plan is a TSX-encoded connect + compose YAML + action document. Construct with ImportPlan. Decode errors accumulate; call Plan.Validate before Plan.Run / ExecJSON.
func ImportPlan ¶ added in v0.8.1
ImportPlan loads a TSX plan JSON document. Parse errors accumulate on the returned Plan; call Plan.Validate.
func (*Plan) Compose ¶ added in v0.8.1
Compose loads the plan YAML through ImportYAML.
type PlatformOpt ¶ added in v0.8.1
type PlatformOpt struct {
// contains filtered or unexported fields
}
PlatformOpt is the value returned by Platform. It implements BuildOption, ContainerOption, EngineBuildOption, EnginePullOption, JobOption, and ServiceOption.
func Platform ¶ added in v0.8.1
func Platform(p string) PlatformOpt
Platform sets the target platform (Compose platform / Engine create, pull, or build).
type Plugin ¶ added in v0.8.1
type Plugin = plugintypes.Plugin
Remaining Engine client option and result types used by Engine.
type PluginConfig ¶ added in v0.8.1
type PluginConfig = plugintypes.Config
Remaining Engine client option and result types used by Engine.
type PluginCreateOptions ¶ added in v0.8.1
type PluginCreateOptions = clienttypes.PluginCreateOptions
Remaining Engine client option and result types used by Engine.
type PluginCreateResult ¶ added in v0.8.1
type PluginCreateResult = clienttypes.PluginCreateResult
Remaining Engine client option and result types used by Engine.
func CreatePlugin ¶ added in v0.8.1
func CreatePlugin(ctx context.Context, api Engine, opts ...EnginePluginCreateOption) (PluginCreateResult, error)
CreatePlugin wraps Engine.PluginCreate.
type PluginDisableOptions ¶ added in v0.8.1
type PluginDisableOptions = clienttypes.PluginDisableOptions
Remaining Engine client option and result types used by Engine.
type PluginDisableResult ¶ added in v0.8.1
type PluginDisableResult = clienttypes.PluginDisableResult
Remaining Engine client option and result types used by Engine.
func DisablePlugin ¶ added in v0.8.1
func DisablePlugin(ctx context.Context, api Engine, name string, opts ...EnginePluginDisableOption) (PluginDisableResult, error)
DisablePlugin wraps the corresponding Engine client method.
type PluginEnableOptions ¶ added in v0.8.1
type PluginEnableOptions = clienttypes.PluginEnableOptions
Remaining Engine client option and result types used by Engine.
type PluginEnableResult ¶ added in v0.8.1
type PluginEnableResult = clienttypes.PluginEnableResult
Remaining Engine client option and result types used by Engine.
func EnablePlugin ¶ added in v0.8.1
func EnablePlugin(ctx context.Context, api Engine, name string, opts ...EnginePluginEnableOption) (PluginEnableResult, error)
EnablePlugin wraps the corresponding Engine client method.
type PluginInspectOptions ¶ added in v0.8.1
type PluginInspectOptions = clienttypes.PluginInspectOptions
Remaining Engine client option and result types used by Engine.
type PluginInspectResult ¶ added in v0.8.1
type PluginInspectResult = clienttypes.PluginInspectResult
Remaining Engine client option and result types used by Engine.
func InspectPlugin ¶ added in v0.8.1
InspectPlugin wraps the corresponding Engine client method.
type PluginInstallOptions ¶ added in v0.8.1
type PluginInstallOptions = clienttypes.PluginInstallOptions
Remaining Engine client option and result types used by Engine.
type PluginInstallResult ¶ added in v0.8.1
type PluginInstallResult = clienttypes.PluginInstallResult
Remaining Engine client option and result types used by Engine.
func InstallPlugin ¶ added in v0.8.1
func InstallPlugin(ctx context.Context, api Engine, name string, opts ...EnginePluginInstallOption) (PluginInstallResult, error)
InstallPlugin wraps Engine.PluginInstall.
type PluginListOptions ¶ added in v0.8.1
type PluginListOptions = clienttypes.PluginListOptions
Remaining Engine client option and result types used by Engine.
type PluginListResult ¶ added in v0.8.1
type PluginListResult = clienttypes.PluginListResult
Remaining Engine client option and result types used by Engine.
func ListPlugins ¶ added in v0.8.1
func ListPlugins(ctx context.Context, api Engine, opts ...EnginePluginListOption) (PluginListResult, error)
ListPlugins wraps the corresponding Engine client method.
type PluginPrivilege ¶ added in v0.8.1
type PluginPrivilege = plugintypes.Privilege
Remaining Engine client option and result types used by Engine.
type PluginPrivileges ¶ added in v0.8.1
type PluginPrivileges = plugintypes.Privileges
Remaining Engine client option and result types used by Engine.
type PluginPushOptions ¶ added in v0.8.1
type PluginPushOptions = clienttypes.PluginPushOptions
Remaining Engine client option and result types used by Engine.
type PluginPushResult ¶ added in v0.8.1
type PluginPushResult = clienttypes.PluginPushResult
Remaining Engine client option and result types used by Engine.
func PushPlugin ¶ added in v0.8.1
func PushPlugin(ctx context.Context, api Engine, name string, opts ...EnginePluginPushOption) (PluginPushResult, error)
PushPlugin wraps Engine.PluginPush.
type PluginRemoveOptions ¶ added in v0.8.1
type PluginRemoveOptions = clienttypes.PluginRemoveOptions
Remaining Engine client option and result types used by Engine.
type PluginRemoveResult ¶ added in v0.8.1
type PluginRemoveResult = clienttypes.PluginRemoveResult
Remaining Engine client option and result types used by Engine.
func RemovePlugin ¶ added in v0.8.1
func RemovePlugin(ctx context.Context, api Engine, name string, opts ...EnginePluginRemoveOption) (PluginRemoveResult, error)
RemovePlugin wraps the corresponding Engine client method.
type PluginSetOptions ¶ added in v0.8.1
type PluginSetOptions = clienttypes.PluginSetOptions
Remaining Engine client option and result types used by Engine.
type PluginSetResult ¶ added in v0.8.1
type PluginSetResult = clienttypes.PluginSetResult
Remaining Engine client option and result types used by Engine.
func SetPlugin ¶ added in v0.8.1
func SetPlugin(ctx context.Context, api Engine, name string, opts ...EnginePluginSetOption) (PluginSetResult, error)
SetPlugin wraps Engine.PluginSet.
type PluginSettings ¶ added in v0.8.1
type PluginSettings = plugintypes.Settings
Remaining Engine client option and result types used by Engine.
type PluginUpgradeOptions ¶ added in v0.8.1
type PluginUpgradeOptions = clienttypes.PluginUpgradeOptions
Remaining Engine client option and result types used by Engine.
type PluginUpgradeResult ¶ added in v0.8.1
type PluginUpgradeResult = clienttypes.PluginUpgradeResult
Remaining Engine client option and result types used by Engine.
func UpgradePlugin ¶ added in v0.8.1
func UpgradePlugin(ctx context.Context, api Engine, name string, opts ...EnginePluginUpgradeOption) (PluginUpgradeResult, error)
UpgradePlugin wraps Engine.PluginUpgrade.
type PolicyOpt ¶ added in v0.8.1
type PolicyOpt struct {
// contains filtered or unexported fields
}
PolicyOpt is the value returned by Policy. It implements RestartOption.
func Policy ¶ added in v0.8.1
func Policy(p RestartPolicy) PolicyOpt
Policy sets the restart policy name in a Restart scope.
type PortOption ¶ added in v0.8.1
type PortOption interface {
// contains filtered or unexported methods
}
PortOption configures a nested Publish scope.
type PostStartOpt ¶ added in v0.8.1
type PostStartOpt struct {
// contains filtered or unexported fields
}
PostStartOpt is the value returned by PostStart. It implements ServiceOption.
func PostStart ¶ added in v0.8.1
func PostStart(opts ...HookOption) PostStartOpt
PostStart adds a Compose post_start hook. Service only.
type PreStartOpt ¶ added in v0.8.1
type PreStartOpt struct {
// contains filtered or unexported fields
}
PreStartOpt is the value returned by PreStart. It implements ServiceOption.
func PreStart ¶ added in v0.8.1
func PreStart(opts ...ContainerOption) PreStartOpt
PreStart adds a Compose pre_start hook using the same container vocabulary.
type PreStopOpt ¶ added in v0.8.1
type PreStopOpt struct {
// contains filtered or unexported fields
}
PreStopOpt is the value returned by PreStop. It implements ServiceOption.
func PreStop ¶ added in v0.8.1
func PreStop(opts ...HookOption) PreStopOpt
PreStop adds a Compose pre_stop hook. Service only.
type PredicateTypesOpt ¶ added in v0.8.1
type PredicateTypesOpt struct {
// contains filtered or unexported fields
}
PredicateTypesOpt is the value returned by PredicateTypes. It implements EngineImageAttestOption.
func PredicateTypes ¶ added in v0.8.1
func PredicateTypes(types ...string) PredicateTypesOpt
PredicateTypes filters image attestations by in-toto predicate type URIs.
type PrintOpt ¶ added in v0.8.1
type PrintOpt struct {
// contains filtered or unexported fields
}
PrintOpt is the value returned by Print. It implements ComposeBuildOption, ComposeCreateOption, UpOption, and WatchOption.
type PriorityOpt ¶ added in v0.8.1
type PriorityOpt struct {
// contains filtered or unexported fields
}
PriorityOpt is the value returned by Priority. It implements NetworkOption.
func Priority ¶ added in v0.8.1
func Priority(n int) PriorityOpt
Priority sets Compose networks.priority inside Network.
type PrivilegeOpt ¶ added in v0.8.1
type PrivilegeOpt struct {
// contains filtered or unexported fields
}
PrivilegeOpt is the value returned by Privilege. It implements EnginePluginInstallOption and EnginePluginUpgradeOption.
func Privilege ¶ added in v0.8.1
func Privilege(fn func(context.Context) (string, error)) PrivilegeOpt
Privilege supplies a registry-auth retry callback for InstallPlugin and UpgradePlugin.
type PrivilegedOpt ¶ added in v0.8.1
type PrivilegedOpt struct {
// contains filtered or unexported fields
}
PrivilegedOpt is the value returned by Privileged. It implements BuildOption, ContainerOption, EngineExecCreateOption, HookOption, JobOption, RunOption, ServiceOption, and WatchTriggerOption.
func Privileged ¶ added in v0.8.1
func Privileged(v bool) PrivilegedOpt
Privileged sets privileged mode, including explicit false. Inside Build it maps to compose build.privileged.
type ProfileOpt ¶ added in v0.8.1
type ProfileOpt struct {
// contains filtered or unexported fields
}
ProfileOpt is the value returned by Profile. It implements ImportOption, LoadProjectOption, and ServiceOption.
func Profile ¶ added in v0.8.1
func Profile(p string) ProfileOpt
Profile adds a Compose profile on a service or LoadProject.
type ProgressOpt ¶ added in v0.8.1
type ProgressOpt struct {
// contains filtered or unexported fields
}
ProgressOpt is the value returned by Progress. It implements ComposeBuildOption, ComposeCreateOption, LoggerOption, UpOption, and WatchOption.
type Project ¶
type Project = composetypes.Project
Project is a loaded compose-go project. LoadProject and Generate return one.
func LoadProject ¶ added in v0.8.1
LoadProject loads a Compose project through a Composer using the Compose v5 SDK loader (remote includes, OCI, unsupported-attribute detection). Local YAML without a Composer is ImportFile / ImportYAML.
type ProjectDirectoryOpt ¶ added in v0.8.1
type ProjectDirectoryOpt struct {
// contains filtered or unexported fields
}
ProjectDirectoryOpt is the value returned by ProjectDirectory. It implements ImportOption, IncludeOption, and LoadProjectOption.
func ProjectDirectory ¶ added in v0.8.1
func ProjectDirectory(s string) ProjectDirectoryOpt
ProjectDirectory sets Compose include.project_directory inside AddInclude or the working directory on LoadProject.
type ProjectFnOpt ¶ added in v0.8.1
type ProjectFnOpt struct {
// contains filtered or unexported fields
}
ProjectFnOpt is the value returned by ProjectOption, Interpolation, Normalization, Consistency, ResolvedPaths, DiscardEnvFile, OsEnv, DotEnv, ConfigFileEnv, DefaultConfigPath, EnvironmentResolution, and LabelsResolution. It implements LoadProjectOption.
func ConfigFileEnv ¶ added in v0.8.1
func ConfigFileEnv() ProjectFnOpt
ConfigFileEnv reads COMPOSE_FILE on LoadProject.
func Consistency ¶ added in v0.8.1
func Consistency(v bool) ProjectFnOpt
Consistency enables or disables compose-go consistency checks on LoadProject.
func DefaultConfigPath ¶ added in v0.8.1
func DefaultConfigPath() ProjectFnOpt
DefaultConfigPath searches default compose.yaml paths on LoadProject.
func DiscardEnvFile ¶ added in v0.8.1
func DiscardEnvFile() ProjectFnOpt
DiscardEnvFile skips applying env_file values onto the project environment.
func DotEnv ¶ added in v0.8.1
func DotEnv() ProjectFnOpt
DotEnv reads .env into the project environment on LoadProject.
func EnvironmentResolution ¶ added in v0.8.1
func EnvironmentResolution(v bool) ProjectFnOpt
EnvironmentResolution enables or disables environment resolution on LoadProject.
func Interpolation ¶ added in v0.8.1
func Interpolation(v bool) ProjectFnOpt
Interpolation enables or disables compose-go interpolation on LoadProject.
func LabelsResolution ¶ added in v0.8.1
func LabelsResolution(v bool) ProjectFnOpt
LabelsResolution enables or disables label resolution on LoadProject.
func Normalization ¶ added in v0.8.1
func Normalization(v bool) ProjectFnOpt
Normalization enables or disables compose-go normalization on LoadProject.
func OsEnv ¶ added in v0.8.1
func OsEnv() ProjectFnOpt
OsEnv loads process environment into the project on LoadProject.
func ProjectOption ¶ added in v0.8.1
func ProjectOption(fn ProjectOptionsFn) ProjectFnOpt
ProjectOption appends a compose-go ProjectOptionsFn on LoadProject.
func ResolvedPaths ¶ added in v0.8.1
func ResolvedPaths(v bool) ProjectFnOpt
ResolvedPaths enables or disables compose-go path resolution on LoadProject.
type ProjectLoadOptions ¶ added in v0.8.1
type ProjectLoadOptions = composeapi.ProjectLoadOptions
Compose SDK types used by LoadProject, ConsumeLogs, and EventConsumer so callers never import compose/v5.
type ProjectOptionsFn ¶ added in v0.8.1
type ProjectOptionsFn = clitypes.ProjectOptionsFn
Compose SDK types used by LoadProject, ConsumeLogs, and EventConsumer so callers never import compose/v5.
type PropagationOpt ¶ added in v0.8.1
type PropagationOpt struct {
// contains filtered or unexported fields
}
PropagationOpt is the value returned by Propagation. It implements VolumeOption.
func Propagation ¶ added in v0.8.1
func Propagation(p propagate.Mode) PropagationOpt
Propagation sets bind-mount propagation inside Volume.
type Proto ¶ added in v0.8.1
Proto is the IP protocol vocabulary (tcp/udp/sctp). Known values live in package proto. The setter is Protocol; Go forbids a type and a function both named Protocol.
type ProtocolOpt ¶ added in v0.8.1
type ProtocolOpt struct {
// contains filtered or unexported fields
}
ProtocolOpt is the value returned by Protocol. It implements ComposePortOption and PortOption.
func Protocol ¶ added in v0.8.1
func Protocol(p Proto) ProtocolOpt
Protocol sets the published-port protocol in a Publish scope.
type ProvenanceOpt ¶ added in v0.8.1
type ProvenanceOpt struct {
// contains filtered or unexported fields
}
ProvenanceOpt is the value returned by Provenance. It implements BuildOption, ComposeBuildOption, ComposeCreateOption, UpOption, and WatchOption.
func Provenance ¶ added in v0.8.1
func Provenance(s string) ProvenanceOpt
Provenance sets build provenance inside Build or Compose.Build.
type ProviderOpt ¶ added in v0.8.1
type ProviderOpt struct {
// contains filtered or unexported fields
}
ProviderOpt is the value returned by Provider. It implements ServiceOption.
func Provider ¶ added in v0.8.1
func Provider(typ string) ProviderOpt
Provider sets Compose provider.type. Service only.
type ProviderOptionOpt ¶ added in v0.8.1
type ProviderOptionOpt struct {
// contains filtered or unexported fields
}
ProviderOptionOpt is the value returned by ProviderOption. It implements ServiceOption.
func ProviderOption ¶ added in v0.8.1
func ProviderOption(key, value string) ProviderOptionOpt
ProviderOption adds Compose provider.options. Service only.
type ProxyOpt ¶ added in v0.8.1
type ProxyOpt struct {
// contains filtered or unexported fields
}
ProxyOpt is the value returned by Proxy. It implements AttachOption.
type PruneOpt ¶ added in v0.8.1
type PruneOpt struct {
// contains filtered or unexported fields
}
PruneOpt is the value returned by Prune. It implements WatchOption.
type PsOption ¶ added in v0.8.1
type PsOption interface {
// contains filtered or unexported methods
}
PsOption configures Compose.Ps.
type PublishAllOpt ¶ added in v0.8.1
type PublishAllOpt struct {
// contains filtered or unexported fields
}
PublishAllOpt is the value returned by PublishAll. It implements ContainerOption.
func PublishAll ¶ added in v0.8.1
func PublishAll(v bool) PublishAllOpt
PublishAll publishes all exposed ports on random host ports. Engine-only.
type PublishOpt ¶ added in v0.8.1
type PublishOpt struct {
// contains filtered or unexported fields
}
PublishOpt is the value returned by Publish. It implements ContainerOption and ServiceOption.
func Publish ¶
func Publish(opts ...PortOption) PublishOpt
Publish adds a published port. Nested setters determine host/container ports.
type PublishOption ¶ added in v0.8.1
type PublishOption interface {
// contains filtered or unexported methods
}
PublishOption configures Compose.PublishOCI.
type PublishedOpt ¶ added in v0.8.1
type PublishedOpt struct {
// contains filtered or unexported fields
}
PublishedOpt is the value returned by Published. It implements PortOption.
func Published ¶ added in v0.8.1
func Published(s string) PublishedOpt
Published sets Compose ports.published, including ranges such as "8083-9000".
type PullMode ¶ added in v0.8.1
PullMode is a Compose pull_policy value. Known values live in package pull.
type PullOpt ¶ added in v0.8.1
type PullOpt struct {
// contains filtered or unexported fields
}
PullOpt is the value returned by Pull. It implements BuildOption, ComposeBuildOption, ComposeCreateOption, EngineBuildOption, RunOption, UpOption, and WatchOption.
type PullOption ¶ added in v0.8.1
type PullOption interface {
// contains filtered or unexported methods
}
PullOption configures Compose.Pull.
type PullPolicyOpt ¶ added in v0.8.1
type PullPolicyOpt struct {
// contains filtered or unexported fields
}
PullPolicyOpt is the value returned by PullPolicy. It implements JobOption and ServiceOption.
func PullPolicy ¶ added in v0.8.1
func PullPolicy(p PullMode) PullPolicyOpt
PullPolicy sets Compose pull_policy. Service and job only.
type PullRefreshAfterOpt ¶ added in v0.8.1
type PullRefreshAfterOpt struct {
// contains filtered or unexported fields
}
PullRefreshAfterOpt is the value returned by PullRefreshAfter. It implements ContainerOption, JobOption, and ServiceOption.
func PullRefreshAfter ¶ added in v0.8.1
func PullRefreshAfter(s string) PullRefreshAfterOpt
PullRefreshAfter sets Compose pull_refresh_after (duration such as "24h").
type PushOpt ¶ added in v0.8.1
type PushOpt struct {
// contains filtered or unexported fields
}
PushOpt is the value returned by Push. It implements ComposeBuildOption, ComposeCreateOption, UpOption, and WatchOption.
type PushOption ¶ added in v0.8.1
type PushOption interface {
// contains filtered or unexported methods
}
PushOption configures Compose.Push.
type QueryRegistryOpt ¶ added in v0.8.1
type QueryRegistryOpt struct {
// contains filtered or unexported fields
}
QueryRegistryOpt is the value returned by QueryRegistry. It implements EngineServiceCreateOption and EngineServiceUpdateOption.
func QueryRegistry ¶ added in v0.8.1
func QueryRegistry(v bool) QueryRegistryOpt
QueryRegistry contacts the registry to resolve image digest on swarm service create/update.
type QuietOpt ¶ added in v0.8.1
type QuietOpt struct {
// contains filtered or unexported fields
}
QuietOpt is the value returned by Quiet. It implements ComposeBuildOption, ComposeCreateOption, EngineBuildOption, EngineImageLoadOption, LoggerOption, PullOption, PushOption, RunOption, UpOption, and WatchOption.
type RawResponseOpt ¶ added in v0.8.1
type RawResponseOpt struct {
// contains filtered or unexported fields
}
RawResponseOpt is the value returned by RawResponse. It implements EngineImageInspectOption.
func RawResponse ¶ added in v0.8.1
func RawResponse(buf *bytes.Buffer) RawResponseOpt
RawResponse stores the raw inspect JSON in buf on InspectImage.
type ReadOnlyOpt ¶ added in v0.8.1
type ReadOnlyOpt struct {
// contains filtered or unexported fields
}
ReadOnlyOpt is the value returned by ReadOnly. It implements ContainerOption, JobOption, ServiceOption, and VolumeOption.
func ReadOnly ¶ added in v0.8.1
func ReadOnly(v bool) ReadOnlyOpt
ReadOnly mounts the root filesystem read-only at the outer scope, or the nested Volume read-only inside Volume(...).
type ReadonlyPathOpt ¶ added in v0.8.1
type ReadonlyPathOpt struct {
// contains filtered or unexported fields
}
ReadonlyPathOpt is the value returned by ReadonlyPath. It implements ContainerOption.
func ReadonlyPath ¶ added in v0.8.1
func ReadonlyPath(p string) ReadonlyPathOpt
ReadonlyPath overrides a readonly path. Engine-only.
type RecreateDependenciesOpt ¶ added in v0.8.1
type RecreateDependenciesOpt struct {
// contains filtered or unexported fields
}
RecreateDependenciesOpt is the value returned by RecreateDependencies. It implements ComposeCreateOption, RunOption, and UpOption.
func RecreateDependencies ¶ added in v0.8.1
func RecreateDependencies(strategy string) RecreateDependenciesOpt
RecreateDependencies sets the recreate strategy for dependency services.
type RecreateOpt ¶ added in v0.8.1
type RecreateOpt struct {
// contains filtered or unexported fields
}
RecreateOpt is the value returned by Recreate. It implements ComposeCreateOption, RunOption, and UpOption.
func Recreate ¶ added in v0.8.1
func Recreate(strategy string) RecreateOpt
Recreate sets the recreate strategy on up/create ("never", "diverged", "force").
type RecursiveOpt ¶ added in v0.8.1
type RecursiveOpt struct {
// contains filtered or unexported fields
}
RecursiveOpt is the value returned by Recursive. It implements VolumeOption.
type ReferenceOpt ¶ added in v0.8.1
type ReferenceOpt struct {
// contains filtered or unexported fields
}
ReferenceOpt is the value returned by Reference. It implements CommitOption and EngineCommitOption.
func Reference ¶ added in v0.8.1
func Reference(s string) ReferenceOpt
Reference sets the commit image reference.
type RegistryAuthFromOpt ¶ added in v0.8.1
type RegistryAuthFromOpt struct {
// contains filtered or unexported fields
}
RegistryAuthFromOpt is the value returned by RegistryAuthFrom. It implements EngineServiceUpdateOption.
func RegistryAuthFrom ¶ added in v0.8.1
func RegistryAuthFrom[T ~string](src T) RegistryAuthFromOpt
RegistryAuthFrom selects where swarm service update reads registry auth ("spec" or "previous-spec").
type RegistryAuthOpt ¶ added in v0.8.1
type RegistryAuthOpt struct {
// contains filtered or unexported fields
}
RegistryAuthOpt is the value returned by RegistryAuth. It implements EngineImagePushOption, EngineImageSearchOption, EnginePluginInstallOption, EnginePluginPushOption, EnginePluginUpgradeOption, EnginePullOption, EngineServiceCreateOption, and EngineServiceUpdateOption.
func RegistryAuth ¶ added in v0.8.1
func RegistryAuth(s string) RegistryAuthOpt
RegistryAuth sets registry credentials for PullImage and swarm service create/update.
type RegistryAuthSource ¶ added in v0.8.1
type RegistryAuthSource = swarmtypes.RegistryAuthSource
Remaining Engine client option and result types used by Engine.
type RegistryLoginOptions ¶ added in v0.8.1
type RegistryLoginOptions = clienttypes.RegistryLoginOptions
Remaining Engine client option and result types used by Engine.
type RegistryLoginResult ¶ added in v0.8.1
type RegistryLoginResult = clienttypes.RegistryLoginResult
Remaining Engine client option and result types used by Engine.
func Login ¶ added in v0.8.1
func Login(ctx context.Context, api Engine, opts ...EngineLoginOption) (RegistryLoginResult, error)
Login wraps the corresponding Engine client method.
type RegistryTokenOpt ¶ added in v0.8.1
type RegistryTokenOpt struct {
// contains filtered or unexported fields
}
RegistryTokenOpt is the value returned by RegistryToken. It implements EngineLoginOption.
func RegistryToken ¶ added in v0.8.1
func RegistryToken(s string) RegistryTokenOpt
RegistryToken sets the registry token for Login. The value is treated as secret in errors.
type RemoteAddrsOpt ¶ added in v0.8.1
type RemoteAddrsOpt struct {
// contains filtered or unexported fields
}
RemoteAddrsOpt is the value returned by RemoteAddrs. It implements EngineSwarmJoinOption.
func RemoteAddrs ¶ added in v0.8.1
func RemoteAddrs(addrs ...string) RemoteAddrsOpt
RemoteAddrs adds manager addresses to contact when joining a swarm (for example 10.0.0.11:2377).
type RemoveImagesOpt ¶ added in v0.8.1
type RemoveImagesOpt struct {
// contains filtered or unexported fields
}
RemoveImagesOpt is the value returned by RemoveImages. It implements DownOption.
func RemoveImages ¶ added in v0.8.1
func RemoveImages(mode string) RemoveImagesOpt
RemoveImages sets down image removal ("all" or "local").
type RemoveOption ¶ added in v0.8.1
type RemoveOption interface {
// contains filtered or unexported methods
}
RemoveOption configures Compose.Remove and Container.Remove.
type RemoveOrphansOpt ¶ added in v0.8.1
type RemoveOrphansOpt struct {
// contains filtered or unexported fields
}
RemoveOrphansOpt is the value returned by RemoveOrphans. It implements ComposeCreateOption, DownOption, KillOption, RunOption, and UpOption.
func RemoveOrphans ¶ added in v0.8.1
func RemoveOrphans(v bool) RemoveOrphansOpt
RemoveOrphans removes containers for undefined services.
type ReplicasOpt ¶ added in v0.8.1
type ReplicasOpt struct {
// contains filtered or unexported fields
}
ReplicasOpt is the value returned by Replicas. It implements DeployOption, EngineServiceCreateOption, EngineServiceUpdateOption, ScaleOption, and ServiceOption.
func Replicas ¶ added in v0.8.1
func Replicas(n int) ReplicasOpt
Replicas sets deploy replicas inside Deploy, or service scale at the outer scope.
type RequiredOpt ¶ added in v0.8.1
type RequiredOpt struct {
// contains filtered or unexported fields
}
RequiredOpt is the value returned by Required. It implements DependOption and EnvFileOption.
type ReserveOpt ¶ added in v0.8.1
type ReserveOpt struct {
// contains filtered or unexported fields
}
ReserveOpt is the value returned by Reserve. It implements DeployOption.
func Reserve ¶ added in v0.8.1
func Reserve(opts ...ReserveOption) ReserveOpt
Reserve sets deploy.resources.reservations inside Deploy.
type ReserveOption ¶ added in v0.8.1
type ReserveOption interface {
// contains filtered or unexported methods
}
ReserveOption configures deploy.resources.reservations inside Reserve.
type ResolveDigestsOpt ¶ added in v0.8.1
type ResolveDigestsOpt struct {
// contains filtered or unexported fields
}
ResolveDigestsOpt is the value returned by ResolveDigests. It implements PublishOption.
func ResolveDigests ¶ added in v0.8.1
func ResolveDigests(v bool) ResolveDigestsOpt
ResolveDigests resolves image references to digests on publish.
type RestartOnFailureOpt ¶ added in v0.8.1
type RestartOnFailureOpt struct {
// contains filtered or unexported fields
}
RestartOnFailureOpt is the value returned by RestartOnFailure. It implements DependOption.
func RestartOnFailure ¶ added in v0.8.1
func RestartOnFailure(v bool) RestartOnFailureOpt
RestartOnFailure marks depends_on restart in a DependsOn scope.
type RestartOpt ¶ added in v0.8.1
type RestartOpt struct {
// contains filtered or unexported fields
}
RestartOpt is the value returned by Restart. It implements ContainerOption, DeployOption, and ServiceOption.
func Restart ¶
func Restart(opts ...RestartOption) RestartOpt
Restart configures the restart policy with nested setters.
type RestartOption ¶ added in v0.8.1
type RestartOption interface {
// contains filtered or unexported methods
}
RestartOption configures a nested Restart scope.
type RestartPolicy ¶ added in v0.8.1
type RestartPolicy = restartpkg.Policy
RestartPolicy is the Engine restart-policy vocabulary. Known values live in package restart.
type RetriesOpt ¶ added in v0.8.1
type RetriesOpt struct {
// contains filtered or unexported fields
}
RetriesOpt is the value returned by Retries. It implements HealthOption.
func Retries ¶ added in v0.8.1
func Retries(n int) RetriesOpt
Retries sets healthcheck retries in a Health scope. Zero is explicit.
type RoleOpt ¶ added in v0.8.1
type RoleOpt struct {
// contains filtered or unexported fields
}
RoleOpt is the value returned by Role. It implements EngineNodeUpdateOption.
func Role ¶ added in v0.8.1
Role sets a swarm node role on UpdateNode. Known values live in package role.
type RunOption ¶ added in v0.8.1
type RunOption interface {
// contains filtered or unexported methods
}
RunOption configures Compose.Run and Compose.Exec.
type RunOpts ¶
RunOpts are BuildKit flags on a Dockerfile RUN instruction. Setting any flag starts a new RUN. Later Run calls with empty options still fold into that instruction.
type RuntimeFlagOpt ¶ added in v0.8.1
type RuntimeFlagOpt struct {
// contains filtered or unexported fields
}
RuntimeFlagOpt is the value returned by RuntimeFlag. It implements ComposeModelOption.
func RuntimeFlag ¶ added in v0.8.1
func RuntimeFlag(s string) RuntimeFlagOpt
RuntimeFlag adds a top-level Compose model runtime flag inside AddModel.
type SBOMOpt ¶ added in v0.8.1
type SBOMOpt struct {
// contains filtered or unexported fields
}
SBOMOpt is the value returned by SBOM. It implements BuildOption, ComposeBuildOption, ComposeCreateOption, UpOption, and WatchOption.
type SELinuxOpt ¶ added in v0.8.1
type SELinuxOpt struct {
// contains filtered or unexported fields
}
SELinuxOpt is the value returned by SELinux. It implements VolumeOption.
type SSHOpt ¶ added in v0.8.1
type SSHOpt struct {
// contains filtered or unexported fields
}
SSHOpt is the value returned by SSH. It implements BuildOption, ComposeBuildOption, ComposeCreateOption, UpOption, and WatchOption.
type ScaleOption ¶ added in v0.8.1
type ScaleOption interface {
// contains filtered or unexported methods
}
ScaleOption configures Compose.Scale.
type SchemeOpt ¶ added in v0.8.1
type SchemeOpt struct {
// contains filtered or unexported fields
}
SchemeOpt is the value returned by Scheme. It implements ClientOption and ComposerClientOption.
type SecretCreateOptions ¶ added in v0.8.1
type SecretCreateOptions = clienttypes.SecretCreateOptions
Remaining Engine client option and result types used by Engine.
type SecretCreateResult ¶ added in v0.8.1
type SecretCreateResult = clienttypes.SecretCreateResult
Remaining Engine client option and result types used by Engine.
func CreateEngineSecret ¶ added in v0.8.1
func CreateEngineSecret(ctx context.Context, api Engine, opts ...EngineSecretCreateOption) (SecretCreateResult, error)
CreateEngineSecret wraps Engine.SecretCreate.
type SecretInspectOptions ¶ added in v0.8.1
type SecretInspectOptions = clienttypes.SecretInspectOptions
Remaining Engine client option and result types used by Engine.
type SecretInspectResult ¶ added in v0.8.1
type SecretInspectResult = clienttypes.SecretInspectResult
Remaining Engine client option and result types used by Engine.
func InspectSecret ¶ added in v0.8.1
InspectSecret wraps the corresponding Engine client method.
type SecretListOptions ¶ added in v0.8.1
type SecretListOptions = clienttypes.SecretListOptions
Remaining Engine client option and result types used by Engine.
type SecretListResult ¶ added in v0.8.1
type SecretListResult = clienttypes.SecretListResult
Remaining Engine client option and result types used by Engine.
func ListSecrets ¶ added in v0.8.1
func ListSecrets(ctx context.Context, api Engine, opts ...EngineSecretListOption) (SecretListResult, error)
ListSecrets wraps the corresponding Engine client method.
type SecretOpt ¶ added in v0.8.1
type SecretOpt struct {
// contains filtered or unexported fields
}
SecretOpt is the value returned by Secret. It implements BuildOption, JobOption, and ServiceOption.
func Secret ¶ added in v0.8.1
func Secret(opts ...SecretOption) SecretOpt
Secret adds a Compose secret reference on a service/job.
type SecretOption ¶ added in v0.8.1
type SecretOption interface {
// contains filtered or unexported methods
}
SecretOption configures a nested Secret reference or definition.
type SecretRemoveOptions ¶ added in v0.8.1
type SecretRemoveOptions = clienttypes.SecretRemoveOptions
Remaining Engine client option and result types used by Engine.
type SecretRemoveResult ¶ added in v0.8.1
type SecretRemoveResult = clienttypes.SecretRemoveResult
Remaining Engine client option and result types used by Engine.
func RemoveSecret ¶ added in v0.8.1
RemoveSecret wraps the corresponding Engine client method.
type SecretSpec ¶ added in v0.8.1
type SecretSpec = swarmtypes.SecretSpec
Remaining Engine client option and result types used by Engine.
type SecretUpdateOptions ¶ added in v0.8.1
type SecretUpdateOptions = clienttypes.SecretUpdateOptions
Remaining Engine client option and result types used by Engine.
type SecretUpdateResult ¶ added in v0.8.1
type SecretUpdateResult = clienttypes.SecretUpdateResult
Remaining Engine client option and result types used by Engine.
func UpdateEngineSecret ¶ added in v0.8.1
func UpdateEngineSecret(ctx context.Context, api Engine, id string, opts ...EngineSecretUpdateOption) (SecretUpdateResult, error)
UpdateEngineSecret wraps Engine.SecretUpdate.
type ServerAddressOpt ¶ added in v0.8.1
type ServerAddressOpt struct {
// contains filtered or unexported fields
}
ServerAddressOpt is the value returned by ServerAddress. It implements EngineLoginOption.
func ServerAddress ¶ added in v0.8.1
func ServerAddress(s string) ServerAddressOpt
ServerAddress sets the registry host for Login.
type ServerVersionOptions ¶ added in v0.8.1
type ServerVersionOptions = clienttypes.ServerVersionOptions
Remaining Engine client option and result types used by Engine.
type ServerVersionResult ¶ added in v0.8.1
type ServerVersionResult = clienttypes.ServerVersionResult
Remaining Engine client option and result types used by Engine.
func EngineVersion ¶ added in v0.8.1
func EngineVersion(ctx context.Context, api Engine) (ServerVersionResult, error)
EngineVersion wraps Engine.ServerVersion (GET /version).
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service is a Compose service: shared container settings plus Compose-only fields.
func NewService ¶
func NewService(opts ...ServiceOption) *Service
NewService applies typed options and always returns a service. A *Container is a ServiceOption: NewService(NewContainer(Name("foo-server"), ...), ...). The service name is taken from the container when present, otherwise generated from the image. Call Service.Validate to inspect accumulated errors.
func (*Service) Apply ¶ added in v0.8.1
func (s *Service) Apply(opts ...ServiceOption) error
Apply adds options to an existing service. Errors join the service's accumulated set and are also returned.
func (*Service) ComposeConfig ¶ added in v0.8.1
func (s *Service) ComposeConfig() (composetypes.ServiceConfig, error)
ComposeConfig translates the service into a Compose SDK service config.
func (*Service) ContainerName ¶ added in v0.8.1
ContainerName returns the Compose container_name, or empty if omitted.
type ServiceCreateOptions ¶ added in v0.8.1
type ServiceCreateOptions = clienttypes.ServiceCreateOptions
Remaining Engine client option and result types used by Engine.
type ServiceCreateResult ¶ added in v0.8.1
type ServiceCreateResult = clienttypes.ServiceCreateResult
Remaining Engine client option and result types used by Engine.
func CreateSwarmService ¶ added in v0.8.1
func CreateSwarmService(ctx context.Context, api Engine, opts ...EngineServiceCreateOption) (ServiceCreateResult, error)
CreateSwarmService wraps Engine.ServiceCreate.
type ServiceInspectOptions ¶ added in v0.8.1
type ServiceInspectOptions = clienttypes.ServiceInspectOptions
Remaining Engine client option and result types used by Engine.
type ServiceInspectResult ¶ added in v0.8.1
type ServiceInspectResult = clienttypes.ServiceInspectResult
Remaining Engine client option and result types used by Engine.
func InspectSwarmService ¶ added in v0.8.1
InspectSwarmService wraps the corresponding Engine client method.
type ServiceListOptions ¶ added in v0.8.1
type ServiceListOptions = clienttypes.ServiceListOptions
Remaining Engine client option and result types used by Engine.
type ServiceListResult ¶ added in v0.8.1
type ServiceListResult = clienttypes.ServiceListResult
Remaining Engine client option and result types used by Engine.
func ListSwarmServices ¶ added in v0.8.1
func ListSwarmServices(ctx context.Context, api Engine, opts ...EngineServiceListOption) (ServiceListResult, error)
ListSwarmServices wraps the corresponding Engine client method.
type ServiceLogsOptions ¶ added in v0.8.1
type ServiceLogsOptions = clienttypes.ServiceLogsOptions
Remaining Engine client option and result types used by Engine.
type ServiceLogsResult ¶ added in v0.8.1
type ServiceLogsResult = clienttypes.ServiceLogsResult
Remaining Engine client option and result types used by Engine.
func SwarmServiceLogs ¶ added in v0.8.1
func SwarmServiceLogs(ctx context.Context, api Engine, id string, opts ...EngineServiceLogsOption) (ServiceLogsResult, error)
SwarmServiceLogs wraps Engine.ServiceLogs.
type ServiceNameOpt ¶ added in v0.8.1
type ServiceNameOpt struct {
// contains filtered or unexported fields
}
ServiceNameOpt is the value returned by ServiceName. It implements AttachOption, CommitOption, ExportOption, and RunOption.
func ServiceName ¶ added in v0.8.1
func ServiceName(s string) ServiceNameOpt
ServiceName selects a service for run/exec/attach/export/commit.
type ServiceOption ¶ added in v0.8.1
type ServiceOption interface {
// contains filtered or unexported methods
}
ServiceOption configures a Service.
type ServiceRemoveOptions ¶ added in v0.8.1
type ServiceRemoveOptions = clienttypes.ServiceRemoveOptions
Remaining Engine client option and result types used by Engine.
type ServiceRemoveResult ¶ added in v0.8.1
type ServiceRemoveResult = clienttypes.ServiceRemoveResult
Remaining Engine client option and result types used by Engine.
func RemoveSwarmService ¶ added in v0.8.1
RemoveSwarmService wraps the corresponding Engine client method.
type ServiceRollbackOpt ¶ added in v0.8.1
type ServiceRollbackOpt struct {
// contains filtered or unexported fields
}
ServiceRollbackOpt is the value returned by ServiceRollback. It implements EngineServiceUpdateOption.
func ServiceRollback ¶ added in v0.8.1
func ServiceRollback(v string) ServiceRollbackOpt
ServiceRollback requests a server-side swarm service rollback ("previous" or "none").
type ServiceSpec ¶ added in v0.8.1
type ServiceSpec = swarmtypes.ServiceSpec
Remaining Engine client option and result types used by Engine.
type ServiceUpdateOptions ¶ added in v0.8.1
type ServiceUpdateOptions = clienttypes.ServiceUpdateOptions
Remaining Engine client option and result types used by Engine.
type ServiceUpdateResult ¶ added in v0.8.1
type ServiceUpdateResult = clienttypes.ServiceUpdateResult
Remaining Engine client option and result types used by Engine.
func UpdateSwarmService ¶ added in v0.8.1
func UpdateSwarmService(ctx context.Context, api Engine, id string, opts ...EngineServiceUpdateOption) (ServiceUpdateResult, error)
UpdateSwarmService wraps Engine.ServiceUpdate.
type ServicesOpt ¶ added in v0.8.1
type ServicesOpt struct {
// contains filtered or unexported fields
}
ServicesOpt is the value returned by Services. It implements ComposeBuildOption, ComposeCreateOption, ComposeRestartOption, ComposeStartOption, ComposeStopOption, DownOption, EventsOption, ImagesOption, KillOption, LoadProjectOption, LogsOption, PauseOption, PsOption, RemoveOption, ScaleOption, UpOption, VolumesListOption, WaitOption, and WatchOption.
func Services ¶ added in v0.8.1
func Services(names ...string) ServicesOpt
Services selects service names for a Compose runtime action.
type Session ¶ added in v0.8.1
type Session struct {
// contains filtered or unexported fields
}
Session keeps one Docker client for a stream of plan calls.
type ShellOpt ¶ added in v0.8.1
type ShellOpt struct {
// contains filtered or unexported fields
}
ShellOpt is the value returned by Shell. It implements ContainerOption.
type SinceOpt ¶ added in v0.8.1
type SinceOpt struct {
// contains filtered or unexported fields
}
SinceOpt is the value returned by Since. It implements EngineContainerListOption, EngineEventsOption, EngineServiceLogsOption, EngineTaskLogsOption, EventsOption, and LogsOption.
type SizeOpt ¶ added in v0.8.1
type SizeOpt struct {
// contains filtered or unexported fields
}
SizeOpt is the value returned by Size. It implements VolumeOption.
type SoftOpt ¶ added in v0.8.1
type SoftOpt struct {
// contains filtered or unexported fields
}
SoftOpt is the value returned by Soft. It implements UlimitOption.
type SourceOpt ¶ added in v0.8.1
type SourceOpt struct {
// contains filtered or unexported fields
}
SourceOpt is the value returned by Source. It implements BuildOption, DeviceOption, EngineBuildOption, EngineCopyFromOption, EngineImageTagOption, FileConfigOption, SecretOption, and VolumeOption.
type SpecOpt ¶ added in v0.8.1
type SpecOpt struct {
// contains filtered or unexported fields
}
SpecOpt is the value returned by BlkioWeightDevice, BlkioReadBps, BlkioWriteBps, BlkioReadIOps, BlkioWriteIOps, DeviceCgroupRule, IPC, PID, UTS, UserNS, Cgroup, CgroupParent, CgroupNS, Runtime, Umask, NetworkDisabled, DNS, DNSOption, DNSSearch, Link, MemoryReservation, MemorySwap, MemorySwappiness, ShmSize, CPUShares, CPUPeriod, CPUQuota, CPUSet, CPUSetMems, IOMaximumIOps, IOMaximumBandwidth, CPURealtimePeriod, CPURealtimeRuntime, CPUCount, CPUPercent, OomScoreAdj, OomKillDisable, BlkioWeight, Sysctl, SecurityOpt, StorageOpt, GroupAdd, Annotation, Hostname, DomainName, Init, StopTimeout, VolumesFrom, and VolumeDriver. It implements ContainerOption, JobOption, and ServiceOption.
func Annotation ¶ added in v0.8.1
Annotation adds a runtime annotation.
func BlkioReadBps ¶ added in v0.8.1
BlkioReadBps throttles read bytes/sec on a device.
func BlkioReadIOps ¶ added in v0.8.1
BlkioReadIOps throttles read IOPS on a device.
func BlkioWeight ¶ added in v0.8.1
BlkioWeight sets block IO weight (10–1000).
func BlkioWeightDevice ¶ added in v0.8.1
BlkioWeightDevice adds a per-device blkio weight.
func BlkioWriteBps ¶ added in v0.8.1
BlkioWriteBps throttles write bytes/sec on a device.
func BlkioWriteIOps ¶ added in v0.8.1
BlkioWriteIOps throttles write IOPS on a device.
func CPUPercent ¶ added in v0.8.1
CPUPercent sets Windows CPU percent.
func CPURealtimePeriod ¶ added in v0.8.1
CPURealtimePeriod sets CPU realtime period in microseconds.
func CPURealtimeRuntime ¶ added in v0.8.1
CPURealtimeRuntime sets CPU realtime runtime in microseconds.
func CgroupParent ¶ added in v0.8.1
CgroupParent sets the parent cgroup.
func DNS ¶ added in v0.8.1
DNS adds one DNS server, such as 1.1.1.1. Put it on the service or container. Repeat it for another server.
func DeviceCgroupRule ¶ added in v0.8.1
DeviceCgroupRule adds a device cgroup rule.
func DomainName ¶ added in v0.8.1
DomainName sets the NIS domain name (Engine Domainname / Compose domainname).
func Hostname ¶ added in v0.8.1
Hostname sets the name the container uses for itself. It belongs on the service or container, not on a Network.
func IOMaximumBandwidth ¶ added in v0.8.1
IOMaximumBandwidth sets Windows system-drive byte/s limit.
func IOMaximumIOps ¶ added in v0.8.1
IOMaximumIOps sets Windows system-drive IOps limit.
func MemoryReservation ¶ added in v0.8.1
MemoryReservation sets the soft memory limit in bytes.
func MemorySwap ¶ added in v0.8.1
MemorySwap sets memory+swap in bytes. -1 is unlimited.
func MemorySwappiness ¶ added in v0.8.1
MemorySwappiness sets vm.swappiness (0–100).
func NetworkDisabled ¶ added in v0.8.1
NetworkDisabled disables networking (Engine NetworkDisabled, Compose network_mode=none).
func OomKillDisable ¶ added in v0.8.1
OomKillDisable disables the OOM killer.
func OomScoreAdj ¶ added in v0.8.1
OomScoreAdj sets OOM score adjustment.
func SecurityOpt ¶ added in v0.8.1
SecurityOpt adds a security option (SELinux, apparmor, ...).
func StopTimeout ¶ added in v0.8.1
StopTimeout sets the stop timeout. Zero is explicit.
func StorageOpt ¶ added in v0.8.1
StorageOpt sets a storage-driver option.
func VolumeDriver ¶ added in v0.8.1
VolumeDriver sets the volume driver name.
func VolumesFrom ¶ added in v0.8.1
VolumesFrom mounts volumes from another container.
type SpreadOpt ¶ added in v0.8.1
type SpreadOpt struct {
// contains filtered or unexported fields
}
SpreadOpt is the value returned by Spread. It implements PlacementOption.
type StartIntervalOpt ¶ added in v0.8.1
type StartIntervalOpt struct {
// contains filtered or unexported fields
}
StartIntervalOpt is the value returned by StartInterval. It implements HealthOption.
func StartInterval ¶ added in v0.8.1
func StartInterval(d time.Duration) StartIntervalOpt
StartInterval sets Compose healthcheck.start_interval inside Health.
type StartPeriodOpt ¶ added in v0.8.1
type StartPeriodOpt struct {
// contains filtered or unexported fields
}
StartPeriodOpt is the value returned by StartPeriod. It implements HealthOption.
func StartPeriod ¶ added in v0.8.1
func StartPeriod(d time.Duration) StartPeriodOpt
StartPeriod sets the healthcheck start period in a Health scope.
type StatementOpt ¶ added in v0.8.1
type StatementOpt struct {
// contains filtered or unexported fields
}
StatementOpt is the value returned by Statement. It implements EngineImageAttestOption.
func Statement ¶ added in v0.8.1
func Statement(v bool) StatementOpt
Statement includes the verbatim in-toto statement body on AttestImage.
type StdinOnceOpt ¶ added in v0.8.1
type StdinOnceOpt struct {
// contains filtered or unexported fields
}
StdinOnceOpt is the value returned by StdinOnce. It implements ContainerOption.
func StdinOnce ¶ added in v0.8.1
func StdinOnce(v bool) StdinOnceOpt
StdinOnce closes stdin after one attached client disconnects. Engine-only.
type StopOpt ¶ added in v0.8.1
type StopOpt struct {
// contains filtered or unexported fields
}
StopOpt is the value returned by Stop. It implements RemoveOption.
type StopSignalOpt ¶ added in v0.8.1
type StopSignalOpt struct {
// contains filtered or unexported fields
}
StopSignalOpt is the value returned by StopSignal. It implements ContainerOption, EngineStopOption, JobOption, KillOption, and ServiceOption.
func StopSignal ¶ added in v0.8.1
func StopSignal(sig signal.Signal) StopSignalOpt
StopSignal sets the signal used to stop or kill the container.
type StreamOpt ¶ added in v0.8.1
type StreamOpt struct {
// contains filtered or unexported fields
}
StreamOpt is the value returned by Stream. It implements EngineAttachOption and EngineStatsOption.
type SubPathOpt ¶ added in v0.8.1
type SubPathOpt struct {
// contains filtered or unexported fields
}
SubPathOpt is the value returned by SubPath. It implements VolumeOption.
func SubPath ¶ added in v0.8.1
func SubPath(p string) SubPathOpt
SubPath sets a volume subpath inside Volume.
type SubnetOpt ¶ added in v0.8.1
type SubnetOpt struct {
// contains filtered or unexported fields
}
SubnetOpt is the value returned by Subnet. It implements ComposeNetOption.
type SwarmGetUnlockKeyResult ¶ added in v0.8.1
type SwarmGetUnlockKeyResult = clienttypes.SwarmGetUnlockKeyResult
Remaining Engine client option and result types used by Engine.
func SwarmUnlockKey ¶ added in v0.8.1
func SwarmUnlockKey(ctx context.Context, api Engine) (SwarmGetUnlockKeyResult, error)
SwarmUnlockKey wraps the corresponding Engine client method.
type SwarmInitOptions ¶ added in v0.8.1
type SwarmInitOptions = clienttypes.SwarmInitOptions
Remaining Engine client option and result types used by Engine.
type SwarmInitResult ¶ added in v0.8.1
type SwarmInitResult = clienttypes.SwarmInitResult
Remaining Engine client option and result types used by Engine.
func InitSwarm ¶ added in v0.8.1
func InitSwarm(ctx context.Context, api Engine, opts ...EngineSwarmInitOption) (SwarmInitResult, error)
InitSwarm wraps the corresponding Engine client method.
type SwarmInspectOptions ¶ added in v0.8.1
type SwarmInspectOptions = clienttypes.SwarmInspectOptions
Remaining Engine client option and result types used by Engine.
type SwarmInspectResult ¶ added in v0.8.1
type SwarmInspectResult = clienttypes.SwarmInspectResult
Remaining Engine client option and result types used by Engine.
func InspectSwarm ¶ added in v0.8.1
func InspectSwarm(ctx context.Context, api Engine) (SwarmInspectResult, error)
InspectSwarm wraps the corresponding Engine client method.
type SwarmJoinOptions ¶ added in v0.8.1
type SwarmJoinOptions = clienttypes.SwarmJoinOptions
Remaining Engine client option and result types used by Engine.
type SwarmJoinResult ¶ added in v0.8.1
type SwarmJoinResult = clienttypes.SwarmJoinResult
Remaining Engine client option and result types used by Engine.
func JoinSwarm ¶ added in v0.8.1
func JoinSwarm(ctx context.Context, api Engine, opts ...EngineSwarmJoinOption) (SwarmJoinResult, error)
JoinSwarm wraps the corresponding Engine client method.
type SwarmLeaveOptions ¶ added in v0.8.1
type SwarmLeaveOptions = clienttypes.SwarmLeaveOptions
Remaining Engine client option and result types used by Engine.
type SwarmLeaveResult ¶ added in v0.8.1
type SwarmLeaveResult = clienttypes.SwarmLeaveResult
Remaining Engine client option and result types used by Engine.
func LeaveSwarm ¶ added in v0.8.1
func LeaveSwarm(ctx context.Context, api Engine, opts ...EngineSwarmLeaveOption) (SwarmLeaveResult, error)
LeaveSwarm wraps the corresponding Engine client method.
type SwarmUnlockOptions ¶ added in v0.8.1
type SwarmUnlockOptions = clienttypes.SwarmUnlockOptions
Remaining Engine client option and result types used by Engine.
type SwarmUnlockResult ¶ added in v0.8.1
type SwarmUnlockResult = clienttypes.SwarmUnlockResult
Remaining Engine client option and result types used by Engine.
func UnlockSwarm ¶ added in v0.8.1
func UnlockSwarm(ctx context.Context, api Engine, opts ...EngineSwarmUnlockOption) (SwarmUnlockResult, error)
UnlockSwarm wraps the corresponding Engine client method.
type SwarmUpdateOptions ¶ added in v0.8.1
type SwarmUpdateOptions = clienttypes.SwarmUpdateOptions
Remaining Engine client option and result types used by Engine.
type SwarmUpdateResult ¶ added in v0.8.1
type SwarmUpdateResult = clienttypes.SwarmUpdateResult
Remaining Engine client option and result types used by Engine.
func UpdateSwarm ¶ added in v0.8.1
func UpdateSwarm(ctx context.Context, api Engine, opts ...EngineSwarmUpdateOption) (SwarmUpdateResult, error)
UpdateSwarm wraps the corresponding Engine client method.
type SwarmVersion ¶ added in v0.8.1
type SwarmVersion = swarmtypes.Version
Remaining Engine client option and result types used by Engine.
type SystemInfoResult ¶ added in v0.8.1
type SystemInfoResult = clienttypes.SystemInfoResult
Remaining Engine client option and result types used by Engine.
type TLSFromEnvOpt ¶ added in v0.8.1
type TLSFromEnvOpt struct{}
TLSFromEnvOpt is the value returned by TLSFromEnv. It implements ClientOption and ComposerClientOption.
func TLSFromEnv ¶ added in v0.8.1
func TLSFromEnv() TLSFromEnvOpt
TLSFromEnv loads TLS files from DOCKER_CERT_PATH and DOCKER_TLS_VERIFY.
type TLSOpt ¶ added in v0.8.1
type TLSOpt struct {
// contains filtered or unexported fields
}
TLSOpt is the value returned by TLS. It implements ClientOption and ComposerClientOption.
type TLSOption ¶ added in v0.8.1
type TLSOption interface {
// contains filtered or unexported methods
}
TLSOption configures nested TLS client credentials.
type TagOpt ¶ added in v0.8.1
type TagOpt struct {
// contains filtered or unexported fields
}
TagOpt is the value returned by Tag. It implements BuildOption and EngineBuildOption.
type TailOpt ¶ added in v0.8.1
type TailOpt struct {
// contains filtered or unexported fields
}
TailOpt is the value returned by Tail. It implements EngineServiceLogsOption, EngineTaskLogsOption, and LogsOption.
type TarOpt ¶ added in v0.8.1
type TarOpt struct {
// contains filtered or unexported fields
}
TarOpt is the value returned by Tar. It implements EngineBuildOption.
type TargetOpt ¶ added in v0.8.1
type TargetOpt struct {
// contains filtered or unexported fields
}
TargetOpt is the value returned by Target. It implements BuildOption, DeviceOption, EngineBuildOption, EngineCopyToOption, EngineImageTagOption, FileConfigOption, SecretOption, VolumeOption, and WatchTriggerOption.
type TaskInspectOptions ¶ added in v0.8.1
type TaskInspectOptions = clienttypes.TaskInspectOptions
Remaining Engine client option and result types used by Engine.
type TaskInspectResult ¶ added in v0.8.1
type TaskInspectResult = clienttypes.TaskInspectResult
Remaining Engine client option and result types used by Engine.
func InspectTask ¶ added in v0.8.1
InspectTask wraps the corresponding Engine client method.
type TaskListOptions ¶ added in v0.8.1
type TaskListOptions = clienttypes.TaskListOptions
Remaining Engine client option and result types used by Engine.
type TaskListResult ¶ added in v0.8.1
type TaskListResult = clienttypes.TaskListResult
Remaining Engine client option and result types used by Engine.
func ListTasks ¶ added in v0.8.1
func ListTasks(ctx context.Context, api Engine, opts ...EngineTaskListOption) (TaskListResult, error)
ListTasks wraps the corresponding Engine client method.
type TaskLogsOptions ¶ added in v0.8.1
type TaskLogsOptions = clienttypes.TaskLogsOptions
Remaining Engine client option and result types used by Engine.
type TaskLogsResult ¶ added in v0.8.1
type TaskLogsResult = clienttypes.TaskLogsResult
Remaining Engine client option and result types used by Engine.
func TaskLogs ¶ added in v0.8.1
func TaskLogs(ctx context.Context, api Engine, id string, opts ...EngineTaskLogsOption) (TaskLogsResult, error)
TaskLogs wraps Engine.TaskLogs.
type TaskSpec ¶ added in v0.8.1
type TaskSpec = swarmtypes.TaskSpec
Remaining Engine client option and result types used by Engine.
type TemplateDriverOpt ¶ added in v0.8.1
type TemplateDriverOpt struct {
// contains filtered or unexported fields
}
TemplateDriverOpt is the value returned by TemplateDriver. It implements ComposeFileOption and ComposeSecretOption.
func TemplateDriver ¶ added in v0.8.1
func TemplateDriver(s string) TemplateDriverOpt
TemplateDriver sets Compose secrets/configs template_driver.
type TestOpt ¶ added in v0.8.1
type TestOpt struct {
// contains filtered or unexported fields
}
TestOpt is the value returned by Test. It implements HealthOption.
type TimeoutOpt ¶ added in v0.8.1
type TimeoutOpt struct {
// contains filtered or unexported fields
}
TimeoutOpt is the value returned by Timeout. It implements ClientOption, ComposeCreateOption, ComposeRestartOption, ComposeStartOption, ComposeStopOption, ComposerClientOption, DownOption, EnginePluginEnableOption, EngineStopOption, HealthOption, RunOption, and UpOption.
func Timeout ¶ added in v0.8.1
func Timeout(d time.Duration) TimeoutOpt
Timeout sets a duration for healthchecks, compose wait/stop, Engine stop, and EnablePlugin (seconds). Zero is explicit.
type TimestampsOpt ¶ added in v0.8.1
type TimestampsOpt struct {
// contains filtered or unexported fields
}
TimestampsOpt is the value returned by Timestamps. It implements EngineServiceLogsOption, EngineTaskLogsOption, LoggerOption, and LogsOption.
func Timestamps ¶ added in v0.8.1
func Timestamps(v bool) TimestampsOpt
Timestamps includes timestamps in container logs and NewLogger output.
type TmpfsMountOpt ¶ added in v0.8.1
type TmpfsMountOpt struct {
// contains filtered or unexported fields
}
TmpfsMountOpt is the value returned by TmpfsMount. It implements ContainerOption, JobOption, and ServiceOption.
func TmpfsMount ¶ added in v0.8.1
func TmpfsMount(path string) TmpfsMountOpt
TmpfsMount adds a Compose service-level tmpfs path (short syntax). Long syntax uses Volume with Kind(Tmpfs).
type TraceOptionsOpt ¶ added in v0.8.1
type TraceOptionsOpt struct {
// contains filtered or unexported fields
}
TraceOptionsOpt is the value returned by TraceOptions. It implements ClientOption and ComposerClientOption.
func TraceOptions ¶ added in v0.8.1
func TraceOptions(opts ...otelhttp.Option) TraceOptionsOpt
TraceOptions adds OpenTelemetry HTTP span options to the Engine client.
type TraceProviderOpt ¶ added in v0.8.1
type TraceProviderOpt struct {
// contains filtered or unexported fields
}
TraceProviderOpt is the value returned by TraceProvider. It implements ClientOption and ComposerClientOption.
func TraceProvider ¶ added in v0.8.1
func TraceProvider(p trace.TracerProvider) TraceProviderOpt
TraceProvider sets the OpenTelemetry tracer provider for Engine HTTP spans.
type TtyOpt ¶ added in v0.8.1
type TtyOpt struct {
// contains filtered or unexported fields
}
TtyOpt is the value returned by Tty. It implements ContainerOption, EngineExecAttachOption, EngineExecCreateOption, EngineExecStartOption, JobOption, RunOption, and ServiceOption.
type UIDOpt ¶ added in v0.8.1
type UIDOpt struct {
// contains filtered or unexported fields
}
UIDOpt is the value returned by UID. It implements FileConfigOption and SecretOption.
type UlimitOpt ¶ added in v0.8.1
type UlimitOpt struct {
// contains filtered or unexported fields
}
UlimitOpt is the value returned by Ulimit. It implements BuildOption, ContainerOption, JobOption, and ServiceOption.
func Ulimit ¶ added in v0.8.1
func Ulimit(opts ...UlimitOption) UlimitOpt
Ulimit adds a ulimit shared by Engine Resources.Ulimits and Compose ulimits.
type UlimitOption ¶ added in v0.8.1
type UlimitOption interface {
// contains filtered or unexported methods
}
UlimitOption configures a nested Ulimit scope.
type UnsupportedAttribute ¶
type UnsupportedAttribute = composeapi.UnsupportedAttribute
Compose SDK types used by LoadProject, ConsumeLogs, and EventConsumer so callers never import compose/v5.
type UntilOpt ¶ added in v0.8.1
type UntilOpt struct {
// contains filtered or unexported fields
}
UntilOpt is the value returned by Until. It implements EngineEventsOption, EngineServiceLogsOption, EngineTaskLogsOption, EventsOption, and LogsOption.
type UpOption ¶ added in v0.8.1
type UpOption interface {
// contains filtered or unexported methods
}
UpOption configures Compose.Up.
type UpdateOpt ¶ added in v0.8.1
type UpdateOpt struct {
// contains filtered or unexported fields
}
UpdateOpt is the value returned by Update and Rollback. It implements DeployOption.
func Rollback ¶ added in v0.8.1
func Rollback(opts ...UpdateOption) UpdateOpt
Rollback sets deploy.rollback_config inside Deploy.
func Update ¶ added in v0.8.1
func Update(opts ...UpdateOption) UpdateOpt
Update sets deploy.update_config inside Deploy.
type UpdateOption ¶ added in v0.8.1
type UpdateOption interface {
// contains filtered or unexported methods
}
UpdateOption configures nested Update / Rollback deploy settings.
type UsageOpt ¶ added in v0.8.1
type UsageOpt struct {
// contains filtered or unexported fields
}
UsageOpt is the value returned by Usage. It implements EngineDiskUsageOption.
type UseAPISocketOpt ¶ added in v0.8.1
type UseAPISocketOpt struct {
// contains filtered or unexported fields
}
UseAPISocketOpt is the value returned by UseAPISocket. It implements JobOption and ServiceOption.
func UseAPISocket ¶ added in v0.8.1
func UseAPISocket(v bool) UseAPISocketOpt
UseAPISocket forwards the Docker socket into the service. Compose-only.
type UseAliasesOpt ¶ added in v0.8.1
type UseAliasesOpt struct {
// contains filtered or unexported fields
}
UseAliasesOpt is the value returned by UseAliases. It implements RunOption.
func UseAliases ¶ added in v0.8.1
func UseAliases(v bool) UseAliasesOpt
UseAliases uses network aliases on Compose.Run.
type UseServiceNameAliasOpt ¶ added in v0.8.1
type UseServiceNameAliasOpt struct {
// contains filtered or unexported fields
}
UseServiceNameAliasOpt is the value returned by UseServiceNameAlias. It implements NetworkOption.
func UseServiceNameAlias ¶ added in v0.8.1
func UseServiceNameAlias(v bool) UseServiceNameAliasOpt
UseServiceNameAlias sets Compose networks.use_service_name_alias inside Network.
type UserAgentOpt ¶ added in v0.8.1
type UserAgentOpt struct {
// contains filtered or unexported fields
}
UserAgentOpt is the value returned by UserAgent. It implements ClientOption and ComposerClientOption.
func UserAgent ¶ added in v0.8.1
func UserAgent(ua string) UserAgentOpt
UserAgent sets the HTTP User-Agent header.
type UserOpt ¶ added in v0.8.1
type UserOpt struct {
// contains filtered or unexported fields
}
UserOpt is the value returned by User. It implements ContainerOption, EngineExecCreateOption, HookOption, JobOption, RunOption, ServiceOption, and WatchTriggerOption.
type UsernameOpt ¶ added in v0.8.1
type UsernameOpt struct {
// contains filtered or unexported fields
}
UsernameOpt is the value returned by Username. It implements EngineLoginOption.
func Username ¶ added in v0.8.1
func Username(s string) UsernameOpt
Username sets the registry username for Login.
type VerboseOpt ¶ added in v0.8.1
type VerboseOpt struct {
// contains filtered or unexported fields
}
VerboseOpt is the value returned by Verbose. It implements EngineDiskUsageOption and EngineNetworkInspectOption.
func Verbose ¶ added in v0.8.1
func Verbose(v bool) VerboseOpt
Verbose requests extra Engine inspect/list detail.
type VersionIndexOpt ¶ added in v0.8.1
type VersionIndexOpt struct {
// contains filtered or unexported fields
}
VersionIndexOpt is the value returned by VersionIndex. It implements EngineConfigUpdateOption, EngineNodeUpdateOption, EngineSecretUpdateOption, EngineServiceUpdateOption, and EngineVolumeUpdateOption.
func VersionIndex ¶ added in v0.8.1
func VersionIndex(n uint64) VersionIndexOpt
VersionIndex sets the object version index for swarm update operations.
type VizOption ¶ added in v0.8.1
type VizOption interface {
// contains filtered or unexported methods
}
VizOption configures Compose.Viz.
type VolumeCreateOptions ¶ added in v0.8.1
type VolumeCreateOptions = clienttypes.VolumeCreateOptions
Engine client option and result types. They alias the Engine SDK so [client.Client] implements Engine without a kit caller importing that SDK.
type VolumeCreateResult ¶ added in v0.8.1
type VolumeCreateResult = clienttypes.VolumeCreateResult
Engine client option and result types. They alias the Engine SDK so [client.Client] implements Engine without a kit caller importing that SDK.
func CreateVolume ¶ added in v0.8.1
func CreateVolume(ctx context.Context, api Engine, opts ...EngineVolumeOption) (VolumeCreateResult, error)
CreateVolume creates an Engine volume.
type VolumeInspectOptions ¶ added in v0.8.1
type VolumeInspectOptions = clienttypes.VolumeInspectOptions
Remaining Engine client option and result types used by Engine.
type VolumeInspectResult ¶ added in v0.8.1
type VolumeInspectResult = clienttypes.VolumeInspectResult
Remaining Engine client option and result types used by Engine.
func InspectVolume ¶ added in v0.8.1
InspectVolume wraps the corresponding Engine client method.
type VolumeKind ¶ added in v0.8.1
VolumeKind is Engine mount type / Compose volume type. Known values live in package vol.
type VolumeListOptions ¶ added in v0.8.1
type VolumeListOptions = clienttypes.VolumeListOptions
Remaining Engine client option and result types used by Engine.
type VolumeListResult ¶ added in v0.8.1
type VolumeListResult = clienttypes.VolumeListResult
Remaining Engine client option and result types used by Engine.
func ListEngineVolumes ¶ added in v0.8.1
func ListEngineVolumes(ctx context.Context, api Engine, opts ...EngineVolumeListOption) (VolumeListResult, error)
ListEngineVolumes wraps the corresponding Engine client method.
type VolumeOpt ¶ added in v0.8.1
type VolumeOpt struct {
// contains filtered or unexported fields
}
VolumeOpt is the value returned by Volume. It implements ContainerOption, JobOption, and ServiceOption.
func Volume ¶ added in v0.8.1
func Volume(opts ...VolumeOption) VolumeOpt
Volume adds a mount shared by Engine HostConfig.Mounts and Compose volumes.
type VolumeOption ¶ added in v0.8.1
type VolumeOption interface {
// contains filtered or unexported methods
}
VolumeOption configures a nested Volume scope (bind, named, tmpfs).
type VolumePruneOptions ¶ added in v0.8.1
type VolumePruneOptions = clienttypes.VolumePruneOptions
Remaining Engine client option and result types used by Engine.
type VolumePruneResult ¶ added in v0.8.1
type VolumePruneResult = clienttypes.VolumePruneResult
Remaining Engine client option and result types used by Engine.
func PruneVolumes ¶ added in v0.8.1
func PruneVolumes(ctx context.Context, api Engine, opts ...EngineVolumePruneOption) (VolumePruneResult, error)
PruneVolumes wraps the corresponding Engine client method.
type VolumeRemoveOptions ¶ added in v0.8.1
type VolumeRemoveOptions = clienttypes.VolumeRemoveOptions
Remaining Engine client option and result types used by Engine.
type VolumeRemoveResult ¶ added in v0.8.1
type VolumeRemoveResult = clienttypes.VolumeRemoveResult
Remaining Engine client option and result types used by Engine.
func RemoveVolume ¶ added in v0.8.1
func RemoveVolume(ctx context.Context, api Engine, id string, opts ...EngineVolumeRemoveOption) (VolumeRemoveResult, error)
RemoveVolume wraps the corresponding Engine client method.
type VolumeUpdateOptions ¶ added in v0.8.1
type VolumeUpdateOptions = clienttypes.VolumeUpdateOptions
Remaining Engine client option and result types used by Engine.
type VolumeUpdateResult ¶ added in v0.8.1
type VolumeUpdateResult = clienttypes.VolumeUpdateResult
Remaining Engine client option and result types used by Engine.
func UpdateVolume ¶ added in v0.8.1
func UpdateVolume(ctx context.Context, api Engine, id string, opts ...EngineVolumeUpdateOption) (VolumeUpdateResult, error)
UpdateVolume wraps Engine.VolumeUpdate.
type VolumesListOption ¶ added in v0.8.1
type VolumesListOption interface {
// contains filtered or unexported methods
}
VolumesListOption configures Compose.VolumeList.
type VolumesOpt ¶ added in v0.8.1
type VolumesOpt struct {
// contains filtered or unexported fields
}
VolumesOpt is the value returned by Volumes. It implements DownOption, EngineDiskUsageOption, and RemoveOption.
func Volumes ¶
func Volumes(v bool) VolumesOpt
Volumes removes volumes on down/rm, or includes volumes on DiskUsage, including explicit false.
type WaitCondition ¶ added in v0.8.1
WaitCondition is an Engine wait-for-container condition. Known values live in package wait.
type WaitExitError ¶ added in v0.8.1
type WaitExitError = containertypes.WaitExitError
Engine and Compose error payloads, aliased so callers never import those SDKs.
type WaitForOpt ¶ added in v0.8.1
type WaitForOpt struct {
// contains filtered or unexported fields
}
WaitForOpt is the value returned by WaitFor. It implements EngineWaitOption.
func WaitFor ¶ added in v0.8.1
func WaitFor(c WaitCondition) WaitForOpt
WaitFor sets the Engine wait condition.
type WaitOpt ¶ added in v0.8.1
type WaitOpt struct {
// contains filtered or unexported fields
}
WaitOpt is the value returned by Wait. It implements ComposeStartOption and UpOption.
type WaitOption ¶ added in v0.8.1
type WaitOption interface {
// contains filtered or unexported methods
}
WaitOption configures Compose.Wait.
type WaitResponse ¶ added in v0.8.1
type WaitResponse = containertypes.WaitResponse
Engine and Compose error payloads, aliased so callers never import those SDKs.
type WatchAction ¶
WatchAction is a Compose develop.watch action. Known values live in package watch.
type WatchChangesOpt ¶ added in v0.8.1
type WatchChangesOpt struct {
// contains filtered or unexported fields
}
WatchChangesOpt is the value returned by WatchChanges. It implements ComposeStartOption and UpOption.
func WatchChanges ¶ added in v0.8.1
func WatchChanges(v bool) WatchChangesOpt
WatchChanges enables file watch during start/up.
type WatchFilesOpt ¶ added in v0.8.1
type WatchFilesOpt struct {
// contains filtered or unexported fields
}
WatchFilesOpt is the value returned by WatchFiles. It implements DevelopOption.
func WatchFiles ¶ added in v0.8.1
func WatchFiles(opts ...WatchTriggerOption) WatchFilesOpt
WatchFiles adds a develop.watch trigger inside Develop.
type WatchOption ¶ added in v0.8.1
type WatchOption interface {
// contains filtered or unexported methods
}
WatchOption configures Compose.Watch.
type WatchTriggerOption ¶ added in v0.8.1
type WatchTriggerOption interface {
// contains filtered or unexported methods
}
WatchTriggerOption configures a Compose develop.watch entry inside Develop.
type WindowOpt ¶ added in v0.8.1
type WindowOpt struct {
// contains filtered or unexported fields
}
WindowOpt is the value returned by Window. It implements RestartOption.
type WithEnvironmentOpt ¶ added in v0.8.1
type WithEnvironmentOpt struct {
// contains filtered or unexported fields
}
WithEnvironmentOpt is the value returned by WithEnvironment. It implements PublishOption.
func WithEnvironment ¶ added in v0.8.1
func WithEnvironment(v bool) WithEnvironmentOpt
WithEnvironment includes environment on publish.
type WorkingDirOpt ¶ added in v0.8.1
type WorkingDirOpt struct {
// contains filtered or unexported fields
}
WorkingDirOpt is the value returned by WorkingDir. It implements ContainerOption, HookOption, JobOption, RunOption, ServiceOption, and WatchTriggerOption.
func WorkingDir ¶ added in v0.8.1
func WorkingDir(dir string) WorkingDirOpt
WorkingDir sets a container, service, job, or hook working directory. Compose project directory on LoadProject is ProjectDirectory.
Source Files
¶
- blkio.go
- build.go
- client.go
- client_connect.go
- client_setters.go
- client_types.go
- compose.go
- compose_docs.go
- compose_extra.go
- compose_fields.go
- compose_resources.go
- composer.go
- constants.go
- container.go
- convert.go
- convert_compose.go
- deploy.go
- device.go
- doc.go
- docker.go
- docker_context.go
- engine.go
- engine_api.go
- engine_api_opts.go
- engine_image_opts.go
- engine_more.go
- engine_only.go
- error.go
- error_class.go
- error_types.go
- export.go
- expose.go
- field.go
- from.go
- generic.go
- grouped.go
- grouped_apply.go
- health.go
- import.go
- import_convert.go
- job.go
- load_project.go
- logger.go
- logger_adapt.go
- logger_render.go
- logger_setters.go
- logging.go
- namegen.go
- namespace.go
- network.go
- option.go
- plugin.go
- publish.go
- registry_auth.go
- resource.go
- restart.go
- runtime.go
- runtime_act.go
- runtime_compose.go
- runtime_engine.go
- runtime_engine_extra.go
- runtime_setters.go
- secret.go
- service.go
- session.go
- setters.go
- spec.go
- stdcopy.go
- swarm_fluent.go
- swarm_opts.go
- taskflow_bridge.go
- terminal.go
- tsx_plan.go
- tsx_plan_gen.go
- volume.go
Directories
¶
| Path | Synopsis |
|---|---|
|
internal
|
|
|
client/jsonmessage/types
Package types catalogs github.com/moby/moby/client/pkg/jsonmessage for wrapping by containerkit.
|
Package types catalogs github.com/moby/moby/client/pkg/jsonmessage for wrapping by containerkit. |
|
client/progress/types
Package types catalogs github.com/moby/moby/client/pkg/progress for wrapping by containerkit.
|
Package types catalogs github.com/moby/moby/client/pkg/progress for wrapping by containerkit. |
|
client/security/types
Package types catalogs github.com/moby/moby/client/pkg/security for wrapping by containerkit.
|
Package types catalogs github.com/moby/moby/client/pkg/security for wrapping by containerkit. |
|
client/types
Package types catalogs github.com/moby/moby/client for wrapping by containerkit.
|
Package types catalogs github.com/moby/moby/client for wrapping by containerkit. |
|
compose/api/types
Package types catalogs github.com/docker/compose/v5/pkg/api for wrapping by containerkit.
|
Package types catalogs github.com/docker/compose/v5/pkg/api for wrapping by containerkit. |
|
compose/cli/types
Package types catalogs github.com/compose-spec/compose-go/v2/cli for wrapping by containerkit.
|
Package types catalogs github.com/compose-spec/compose-go/v2/cli for wrapping by containerkit. |
|
compose/consts/types
Package types catalogs github.com/compose-spec/compose-go/v2/consts for wrapping by containerkit.
|
Package types catalogs github.com/compose-spec/compose-go/v2/consts for wrapping by containerkit. |
|
compose/dotenv/types
Package types catalogs github.com/compose-spec/compose-go/v2/dotenv for wrapping by containerkit.
|
Package types catalogs github.com/compose-spec/compose-go/v2/dotenv for wrapping by containerkit. |
|
compose/graph/types
Package types catalogs github.com/compose-spec/compose-go/v2/graph for wrapping by containerkit.
|
Package types catalogs github.com/compose-spec/compose-go/v2/graph for wrapping by containerkit. |
|
compose/interpolation/types
Package types catalogs github.com/compose-spec/compose-go/v2/interpolation for wrapping by containerkit.
|
Package types catalogs github.com/compose-spec/compose-go/v2/interpolation for wrapping by containerkit. |
|
compose/loader/types
Package types catalogs github.com/compose-spec/compose-go/v2/loader for wrapping by containerkit.
|
Package types catalogs github.com/compose-spec/compose-go/v2/loader for wrapping by containerkit. |
|
compose/paths/types
Package types catalogs github.com/compose-spec/compose-go/v2/paths for wrapping by containerkit.
|
Package types catalogs github.com/compose-spec/compose-go/v2/paths for wrapping by containerkit. |
|
compose/template/types
Package types catalogs github.com/compose-spec/compose-go/v2/template for wrapping by containerkit.
|
Package types catalogs github.com/compose-spec/compose-go/v2/template for wrapping by containerkit. |
|
compose/transform/types
Package types catalogs github.com/compose-spec/compose-go/v2/transform for wrapping by containerkit.
|
Package types catalogs github.com/compose-spec/compose-go/v2/transform for wrapping by containerkit. |
|
compose/tree/types
Package types catalogs github.com/compose-spec/compose-go/v2/tree for wrapping by containerkit.
|
Package types catalogs github.com/compose-spec/compose-go/v2/tree for wrapping by containerkit. |
|
compose/types
Package types catalogs github.com/compose-spec/compose-go/v2/types for wrapping by containerkit.
|
Package types catalogs github.com/compose-spec/compose-go/v2/types for wrapping by containerkit. |
|
compose/utils/types
Package types catalogs github.com/compose-spec/compose-go/v2/utils for wrapping by containerkit.
|
Package types catalogs github.com/compose-spec/compose-go/v2/utils for wrapping by containerkit. |
|
connections/nat/types
Package types catalogs github.com/docker/go-connections/nat for wrapping by containerkit.
|
Package types catalogs github.com/docker/go-connections/nat for wrapping by containerkit. |
|
connections/proxy/types
Package types catalogs github.com/docker/go-connections/proxy for wrapping by containerkit.
|
Package types catalogs github.com/docker/go-connections/proxy for wrapping by containerkit. |
|
connections/sockets/types
Package types catalogs github.com/docker/go-connections/sockets for wrapping by containerkit.
|
Package types catalogs github.com/docker/go-connections/sockets for wrapping by containerkit. |
|
connections/tlsconfig/types
Package types catalogs github.com/docker/go-connections/tlsconfig for wrapping by containerkit.
|
Package types catalogs github.com/docker/go-connections/tlsconfig for wrapping by containerkit. |
|
digest/types
Package types catalogs github.com/opencontainers/go-digest for wrapping by containerkit.
|
Package types catalogs github.com/opencontainers/go-digest for wrapping by containerkit. |
|
engine/auxprogress/types
Package types catalogs github.com/moby/moby/api/types/auxprogress for wrapping by containerkit.
|
Package types catalogs github.com/moby/moby/api/types/auxprogress for wrapping by containerkit. |
|
engine/blkiodev/types
Package types catalogs github.com/moby/moby/api/types/blkiodev for wrapping by containerkit.
|
Package types catalogs github.com/moby/moby/api/types/blkiodev for wrapping by containerkit. |
|
engine/build/types
Package types catalogs github.com/moby/moby/api/types/build for wrapping by containerkit.
|
Package types catalogs github.com/moby/moby/api/types/build for wrapping by containerkit. |
|
engine/checkpoint/types
Package types catalogs github.com/moby/moby/api/types/checkpoint for wrapping by containerkit.
|
Package types catalogs github.com/moby/moby/api/types/checkpoint for wrapping by containerkit. |
|
engine/common/types
Package types catalogs github.com/moby/moby/api/types/common for wrapping by containerkit.
|
Package types catalogs github.com/moby/moby/api/types/common for wrapping by containerkit. |
|
engine/container/types
Package types catalogs github.com/moby/moby/api/types/container for wrapping by containerkit.
|
Package types catalogs github.com/moby/moby/api/types/container for wrapping by containerkit. |
|
engine/events/types
Package types catalogs github.com/moby/moby/api/types/events for wrapping by containerkit.
|
Package types catalogs github.com/moby/moby/api/types/events for wrapping by containerkit. |
|
engine/image/types
Package types catalogs github.com/moby/moby/api/types/image for wrapping by containerkit.
|
Package types catalogs github.com/moby/moby/api/types/image for wrapping by containerkit. |
|
engine/jsonstream/types
Package types catalogs github.com/moby/moby/api/types/jsonstream for wrapping by containerkit.
|
Package types catalogs github.com/moby/moby/api/types/jsonstream for wrapping by containerkit. |
|
engine/mount/types
Package types catalogs github.com/moby/moby/api/types/mount for wrapping by containerkit.
|
Package types catalogs github.com/moby/moby/api/types/mount for wrapping by containerkit. |
|
engine/network/types
Package types catalogs github.com/moby/moby/api/types/network for wrapping by containerkit.
|
Package types catalogs github.com/moby/moby/api/types/network for wrapping by containerkit. |
|
engine/plugin/types
Package types catalogs github.com/moby/moby/api/types/plugin for wrapping by containerkit.
|
Package types catalogs github.com/moby/moby/api/types/plugin for wrapping by containerkit. |
|
engine/registry/types
Package types catalogs github.com/moby/moby/api/types/registry for wrapping by containerkit.
|
Package types catalogs github.com/moby/moby/api/types/registry for wrapping by containerkit. |
|
engine/stdcopy/types
Package types catalogs github.com/moby/moby/api/pkg/stdcopy for wrapping by containerkit.
|
Package types catalogs github.com/moby/moby/api/pkg/stdcopy for wrapping by containerkit. |
|
engine/storage/types
Package types catalogs github.com/moby/moby/api/types/storage for wrapping by containerkit.
|
Package types catalogs github.com/moby/moby/api/types/storage for wrapping by containerkit. |
|
engine/strslice/types
Package types catalogs github.com/moby/moby/api/types/strslice for wrapping by containerkit.
|
Package types catalogs github.com/moby/moby/api/types/strslice for wrapping by containerkit. |
|
engine/swarm/types
Package types catalogs github.com/moby/moby/api/types/swarm for wrapping by containerkit.
|
Package types catalogs github.com/moby/moby/api/types/swarm for wrapping by containerkit. |
|
engine/system/types
Package types catalogs github.com/moby/moby/api/types/system for wrapping by containerkit.
|
Package types catalogs github.com/moby/moby/api/types/system for wrapping by containerkit. |
|
engine/types
Package types catalogs github.com/moby/moby/api/types for wrapping by containerkit.
|
Package types catalogs github.com/moby/moby/api/types for wrapping by containerkit. |
|
engine/volume/types
Package types catalogs github.com/moby/moby/api/types/volume for wrapping by containerkit.
|
Package types catalogs github.com/moby/moby/api/types/volume for wrapping by containerkit. |
|
imagespec/types
Package types catalogs github.com/moby/docker-image-spec/specs-go/v1 for wrapping by containerkit.
|
Package types catalogs github.com/moby/docker-image-spec/specs-go/v1 for wrapping by containerkit. |
|
oci/types
Package types catalogs github.com/opencontainers/image-spec/specs-go/v1 for wrapping by containerkit.
|
Package types catalogs github.com/opencontainers/image-spec/specs-go/v1 for wrapping by containerkit. |
|
reference/types
Package types catalogs github.com/distribution/reference for wrapping by containerkit.
|
Package types catalogs github.com/distribution/reference for wrapping by containerkit. |
|
units/types
Package types catalogs github.com/docker/go-units for wrapping by containerkit.
|
Package types catalogs github.com/docker/go-units for wrapping by containerkit. |