Module bollard::service

source ·
Expand description

Service API: manage and inspect docker services within a swarm

Structs

Address represents an IPv4 or IPv6 IP address.
ClusterInfo represents information about the swarm as is returned by the "/info" endpoint. Join-tokens are not included.
Commit holds the Git-commit (SHA1) that a binary was built from, as reported in the version-string of external tools, such as containerd, or runC.
change item in response to ContainerChanges operation
Configuration for a container that is portable between hosts. When used as ContainerConfig field in an image, ContainerConfig is an optional field containing the configuration of the container that was last committed when creating the image. Previous versions of Docker builder used this field to store build cache, and it is not in active use anymore.
OK response to ContainerCreate operation
ContainerState stores container’s running state. It’s part of ContainerJSONBase and will be returned by the "inspect" command.
A summary of the container’s network settings
OK response to ContainerTop operation
OK response to ContainerUpdate operation
container waiting error, if any
OK response to ContainerWait operation
A device mapping between the host and container
A request for devices to be sent to device drivers
Describes the result obtained from contacting the registry to retrieve image metadata.
Driver represents a driver (network, logging, secrets).
EndpointIPAMConfig represents an endpoint’s IPAM configuration.
Configuration for a network endpoint.
Properties that can be configured to access and load balance a service.
EngineDescription provides information about an engine.
Represents an error.
Actor describes something that generates events, like a container, network, or a volume.
EventMessage represents the information an event contains.
Information about the storage driver used to store the container’s and image’s filesystem.
Health stores information about the container’s healthcheck results.
A test to perform to check that the container is healthy.
HealthcheckResult stores information about a single run of a healthcheck probe
individual image layer information in response to ImageHistory operation
Container configuration that depends on the host we are running on
The logging configuration for this container
Response to an API call that returns just an Id
Image ID or Digest
Information about an image in the local image cache.
Additional metadata of the image in the local cache. This information is local to the daemon, and not part of the image itself.
Information about the image’s RootFS, including the layer IDs.
IndexInfo contains information about a registry.
JoinTokens contains the tokens workers and managers need to join the swarm.
An object describing a limit on resources which can be requested by a task.
ManagerStatus represents the status of a manager. It provides the current status of a node’s manager component, if the node is a manager.
Optional configuration for the bind type.
MountPoint represents a mount point configuration inside the container. This is used for reporting the mountpoints in use by a container.
Optional configuration for the tmpfs type.
Optional configuration for the volume type.
Map of driver specific options
Specifies how a service should be attached to a particular network.
NetworkSettings exposes the network settings in the API
NetworkingConfig represents the container’s networking configuration for each of its interfaces. It is used for the networking configs specified in the docker create and docker network connect commands.
NodeDescription encapsulates the properties of the Node as reported by the agent.
NodeStatus represents the status of a node. It provides the current status of the node, as seen by the manager.
The version number of the object such as node, service, etc. This is needed to avoid conflicting writes. The client must send the version number along with the modified specification when updating these objects. This approach ensures safe concurrency and determinism in that the change on the object may not be applied if the version number has changed from the last read. In other words, if two update requests specify the same base version, only one of the requests can succeed. As a result, two separate update requests that happen at the same time will not unintentionally overwrite each other.
A descriptor struct containing digest, media type, and size, as defined in the OCI Content Descriptors Specification.
Describes the platform which the image in the manifest runs on, as defined in the OCI Image Index Specification.
Represents a peer-node in the swarm
Platform represents the platform (Arch/OS).
A plugin for the Engine API
The config of a plugin.
The interface between Docker and the plugin
Describes a permission the user has to accept upon installing the plugin.
Settings that can be modified by users.
Available plugins per type.


> Note: Only unmanaged (V1) plugins are included in this list. > V1 plugins are "lazily" loaded, and are not returned in this list > if there is no resource using the plugin.
An open port on a container
PortBinding represents a binding between a host IP address and a host port.
RegistryServiceConfig stores daemon registry services configuration.
An object describing the resources which can be advertised by a node and requested by a task.
A container’s resources (cgroups config, ulimits, etc)
The behavior to apply when the container exits. The default is not to restart. An ever increasing delay (double the previous delay, starting at 100ms) is added before each restart to prevent flooding the server.
Runtime describes an OCI compliant runtime. The runtime is invoked by the daemon via the containerd daemon. OCI runtimes act as an interface to the Linux kernel namespaces, cgroups, and SELinux.
The status of the service when it is in one of ReplicatedJob or GlobalJob modes. Absent on Replicated and Global mode services. The JobIteration is an ObjectVersion, but unlike the Service’s version, does not need to be sent with an update request.
The status of the service’s tasks. Provided only when requested as part of a ServiceList operation.
User modifiable configuration for a service.
Scheduling mode for the service.
The mode used for services with a finite number of tasks that run to a completed state.
Specification for the rollback strategy of the service.
Specification for the update strategy of the service.
The status of a service update.
Represents generic information about swarm.
User modifiable swarm configuration.
CA configuration.
Dispatcher configuration.
Parameters related to encryption-at-rest.
Orchestration configuration.
Raft configuration.
Defaults for creating tasks in this cluster.
The log driver to use for tasks created in the orchestrator if unspecified by a service. Updating this value only affects new tasks. Existing tasks continue to use their previously configured log driver until recreated.
Response of Engine API: GET "/version"
User modifiable task configuration.
Container spec for the service.


> Note: ContainerSpec, NetworkAttachmentSpec, and PluginSpec are > mutually exclusive. PluginSpec is only used when the Runtime field > is set to plugin. NetworkAttachmentSpec is used when the Runtime > field is set to attachment.
Specification for DNS related configurations in resolver configuration file (resolv.conf).
File represents a specific target that is backed by a file.
File represents a specific target that is backed by a file.


> Note: Configs.File and Configs.Runtime are mutually exclusive

Security options for the container
CredentialSpec for managed service account (Windows only)
SELinux labels of the container
Specifies the log driver to use for tasks created from this spec. If not present, the default one for the swarm will be used, finally falling back to the engine default if not specified.
Read-only spec type for non-swarm containers attached to swarm overlay networks.


> Note: ContainerSpec, NetworkAttachmentSpec, and PluginSpec are > mutually exclusive. PluginSpec is only used when the Runtime field > is set to plugin. NetworkAttachmentSpec is used when the Runtime > field is set to attachment.
Plugin spec for the service. (Experimental release only.)


> Note: ContainerSpec, NetworkAttachmentSpec, and PluginSpec are > mutually exclusive. PluginSpec is only used when the Runtime field > is set to plugin. NetworkAttachmentSpec is used when the Runtime > field is set to attachment.
Resource requirements which apply to each individual container created as part of the service.
Specification for the restart policy which applies to containers created as part of this service.
Information about the issuer of leaf TLS certificates and the trusted root CA certificate.
Volume configuration
Volume list response
Usage details about the volume. This information is used by the GET /system/df endpoint, and omitted in other endpoints.

Enums

Current local status of this node. Enumeration of values. Since this enum’s variants do not hold data, we can easily define them them as #[repr(C)] which helps with FFI.
NodeState represents the state of a node. Enumeration of values. Since this enum’s variants do not hold data, we can easily define them them as #[repr(C)] which helps with FFI.
Reachability represents the reachability of a node. Enumeration of values. Since this enum’s variants do not hold data, we can easily define them them as #[repr(C)] which helps with FFI.
Enumeration of values. Since this enum’s variants do not hold data, we can easily define them them as #[repr(C)] which helps with FFI.

Type Definitions

User-defined resources can be either Integer resources (e.g, SSD=3) or String resources (e.g, GPU=UUID1).
PortMap describes the mapping of container ports to host ports, using the container’s port-number and protocol as key in the format <port>/<protocol>, for example, 80/udp. If a container’s port is mapped for multiple protocols, separate entries are added to the mapping table.