package backend

import "github.com/dotcloud/docker/api/types/backend"

Package backend includes types to send information to server backends.

Index

Types

type BuildConfig

type BuildConfig struct {
	Source         io.ReadCloser
	ProgressWriter ProgressWriter
	Options        *types.ImageBuildOptions
}

BuildConfig is the configuration used by a BuildManager to start a build

type CommitConfig

type CommitConfig struct {
	Author              string
	Comment             string
	Config              *container.Config
	ContainerConfig     *container.Config
	ContainerID         string
	ContainerMountLabel string
	ContainerOS         string
	ParentImageID       string
}

CommitConfig is the configuration for creating an image as part of a build.

type ContainerAttachConfig

type ContainerAttachConfig struct {
	GetStreams func(multiplexed bool, cancel func()) (io.ReadCloser, io.Writer, io.Writer, error)
	UseStdin   bool
	UseStdout  bool
	UseStderr  bool
	Logs       bool
	Stream     bool
	DetachKeys string
	// Used to signify that streams must be multiplexed by producer as endpoint can't manage multiple streams.
	// This is typically set by HTTP endpoint, while websocket can transport raw streams
	MuxStreams bool
}

ContainerAttachConfig holds the streams to use when connecting to a container to view logs.

type ContainerCreateConfig

type ContainerCreateConfig struct {
	Name                        string
	Config                      *container.Config
	HostConfig                  *container.HostConfig
	NetworkingConfig            *network.NetworkingConfig
	Platform                    *ocispec.Platform
	DefaultReadOnlyNonRecursive bool
}

ContainerCreateConfig is the parameter set to ContainerCreate()

type ContainerInspectOptions

type ContainerInspectOptions struct {
	// Size controls whether to propagate the container's size fields.
	Size bool
}

ContainerInspectOptions defines options for the backend.ContainerInspect call.

type ContainerRmConfig

type ContainerRmConfig struct {
	ForceRemove, RemoveVolume, RemoveLink bool
}

ContainerRmConfig holds arguments for the container remove operation. This struct is used to tell the backend what operations to perform.

type ContainerStatsConfig

type ContainerStatsConfig struct {
	Stream    bool
	OneShot   bool
	OutStream func() io.Writer
}

ContainerStatsConfig holds information for configuring the runtime behavior of a backend.ContainerStats() call.

type CreateImageConfig

type CreateImageConfig struct {
	Tag     reference.NamedTagged
	Pause   bool
	Author  string
	Comment string
	Config  *container.Config
	Changes []string
}

CreateImageConfig is the configuration for creating an image from a container.

type ExecInspect

type ExecInspect struct {
	ID            string
	Running       bool
	ExitCode      *int
	ProcessConfig *ExecProcessConfig
	OpenStdin     bool
	OpenStderr    bool
	OpenStdout    bool
	CanRemove     bool
	ContainerID   string
	DetachKeys    []byte
	Pid           int
}

ExecInspect holds information about a running process started with docker exec.

type ExecProcessConfig

type ExecProcessConfig struct {
	Tty        bool     `json:"tty"`
	Entrypoint string   `json:"entrypoint"`
	Arguments  []string `json:"arguments"`
	Privileged *bool    `json:"privileged,omitempty"`
	User       string   `json:"user,omitempty"`
}

ExecProcessConfig holds information about the exec process running on the host.

type ExecStartConfig

type ExecStartConfig struct {
	Stdin       io.Reader
	Stdout      io.Writer
	Stderr      io.Writer
	ConsoleSize *[2]uint `json:",omitempty"`
}

ExecStartConfig holds the options to start container's exec.

type GetImageAndLayerOptions

type GetImageAndLayerOptions struct {
	PullOption PullOption
	AuthConfig map[string]registry.AuthConfig
	Output     io.Writer
	Platform   *ocispec.Platform
}

GetImageAndLayerOptions are the options supported by GetImageAndReleasableLayer

type GetImageOpts

type GetImageOpts struct {
	Platform *ocispec.Platform
}

GetImageOpts holds parameters to retrieve image information from the backend.

type ImageInspectOpts

type ImageInspectOpts struct {
	Manifests bool
	Platform  *ocispec.Platform
}

ImageInspectOpts holds parameters to inspect an image.

type LogAttr

type LogAttr struct {
	Key   string
	Value string
}

LogAttr is used to hold the extra attributes available in the log message.

type LogMessage

type LogMessage struct {
	Line         []byte
	Source       string
	Timestamp    time.Time
	Attrs        []LogAttr
	PLogMetaData *PartialLogMetaData

	// Err is an error associated with a message. Completeness of a message
	// with Err is not expected, tho it may be partially complete (fields may
	// be missing, gibberish, or nil)
	Err error
}

LogMessage is datastructure that represents piece of output produced by some container. The Line member is a slice of an array whose contents can be changed after a log driver's Log() method returns.

type LogSelector

type LogSelector struct {
	Services []string
	Tasks    []string
}

LogSelector is a list of services and tasks that should be returned as part of a log stream. It is similar to swarmapi.LogSelector, with the difference that the names don't have to be resolved to IDs; this is mostly to avoid accidents later where a swarmapi LogSelector might have been incorrectly used verbatim (and to avoid the handler having to import swarmapi types)

type NetworkListConfig

type NetworkListConfig struct {
	// TODO(@cpuguy83): naming is hard, this is pulled from what was being used in the router before moving here
	Detailed bool
	Verbose  bool
}

NetworkListConfig stores the options available for listing networks

type PartialLogMetaData

type PartialLogMetaData struct {
	Last    bool   // true if this message is last of a partial
	ID      string // identifies group of messages comprising a single record
	Ordinal int    // ordering of message in partial group
}

PartialLogMetaData provides meta data for a partial log message. Messages exceeding a predefined size are split into chunks with this metadata. The expectation is for the logger endpoints to assemble the chunks using this metadata.

type PluginDisableConfig

type PluginDisableConfig struct {
	ForceDisable bool
}

PluginDisableConfig holds arguments for plugin disable.

type PluginEnableConfig

type PluginEnableConfig struct {
	Timeout int
}

PluginEnableConfig holds arguments for plugin enable

type PluginRmConfig

type PluginRmConfig struct {
	ForceRemove bool
}

PluginRmConfig holds arguments for plugin remove.

type ProgressWriter

type ProgressWriter struct {
	Output             io.Writer
	StdoutFormatter    io.Writer
	StderrFormatter    io.Writer
	AuxFormatter       *streamformatter.AuxFormatter
	ProgressReaderFunc func(io.ReadCloser) io.ReadCloser
}

ProgressWriter is a data object to transport progress streams to the client

type PullOption

type PullOption int

PullOption defines different modes for accessing images

const (
	// PullOptionNoPull only returns local images
	PullOptionNoPull PullOption = iota
	// PullOptionForcePull always tries to pull a ref from the registry first
	PullOptionForcePull
	// PullOptionPreferLocal uses local image if it exists, otherwise pulls
	PullOptionPreferLocal
)

Source Files

backend.go build.go

Version
v28.1.1+incompatible (latest)
Published
Apr 18, 2025
Platform
linux/amd64
Imports
9 packages
Last checked
48 minutes ago

Tools for package owners.