docker: Index | Files

package swarm

import ""


Package Files

common.go container.go network.go node.go secret.go service.go swarm.go task.go


const (
    // UpdateFailureActionPause PAUSE
    UpdateFailureActionPause = "pause"
    // UpdateFailureActionContinue CONTINUE
    UpdateFailureActionContinue = "continue"
    // UpdateFailureActionRollback ROLLBACK
    UpdateFailureActionRollback = "rollback"

type Annotations Uses

type Annotations struct {
    Name   string            `json:",omitempty"`
    Labels map[string]string `json:"Labels"`

Annotations represents how to describe an object.

type CAConfig Uses

type CAConfig struct {
    // NodeCertExpiry is the duration certificates should be issued for
    NodeCertExpiry time.Duration `json:",omitempty"`

    // ExternalCAs is a list of CAs to which a manager node will make
    // certificate signing requests for node certificates.
    ExternalCAs []*ExternalCA `json:",omitempty"`

CAConfig represents CA configuration.

type ClusterInfo Uses

type ClusterInfo struct {
    ID  string
    Spec Spec

ClusterInfo represents info about the cluster for outputing in "info" it contains the same information as "Swarm", but without the JoinTokens

type ContainerSpec Uses

type ContainerSpec struct {
    Image           string                  `json:",omitempty"`
    Labels          map[string]string       `json:",omitempty"`
    Command         []string                `json:",omitempty"`
    Args            []string                `json:",omitempty"`
    Hostname        string                  `json:",omitempty"`
    Env             []string                `json:",omitempty"`
    Dir             string                  `json:",omitempty"`
    User            string                  `json:",omitempty"`
    Groups          []string                `json:",omitempty"`
    StopSignal      string                  `json:",omitempty"`
    TTY             bool                    `json:",omitempty"`
    OpenStdin       bool                    `json:",omitempty"`
    ReadOnly        bool                    `json:",omitempty"`
    Mounts          []mount.Mount           `json:",omitempty"`
    StopGracePeriod *time.Duration          `json:",omitempty"`
    Healthcheck     *container.HealthConfig `json:",omitempty"`
    // The format of extra hosts on swarmkit is specified in:
    //    IP_address canonical_hostname [aliases...]
    Hosts     []string           `json:",omitempty"`
    DNSConfig *DNSConfig         `json:",omitempty"`
    Secrets   []*SecretReference `json:",omitempty"`

ContainerSpec represents the spec of a container.

type ContainerStatus Uses

type ContainerStatus struct {
    ContainerID string `json:",omitempty"`
    PID         int    `json:",omitempty"`
    ExitCode    int    `json:",omitempty"`

ContainerStatus represents the status of a container.

type DNSConfig Uses

type DNSConfig struct {
    // Nameservers specifies the IP addresses of the name servers
    Nameservers []string `json:",omitempty"`
    // Search specifies the search list for host-name lookup
    Search []string `json:",omitempty"`
    // Options allows certain internal resolver variables to be modified
    Options []string `json:",omitempty"`

DNSConfig specifies DNS related configurations in resolver configuration file (resolv.conf) Detailed documentation is available in: `nameserver`, `search`, `options` have been supported. TODO: `domain` is not supported yet.

type DispatcherConfig Uses

type DispatcherConfig struct {
    // HeartbeatPeriod defines how often agent should send heartbeats to
    // dispatcher.
    HeartbeatPeriod time.Duration `json:",omitempty"`

DispatcherConfig represents dispatcher configuration.

type Driver Uses

type Driver struct {
    Name    string            `json:",omitempty"`
    Options map[string]string `json:",omitempty"`

Driver represents a driver (network, logging).

type EncryptionConfig Uses

type EncryptionConfig struct {
    // AutoLockManagers specifies whether or not managers TLS keys and raft data
    // should be encrypted at rest in such a way that they must be unlocked
    // before the manager node starts up again.
    AutoLockManagers bool

EncryptionConfig controls at-rest encryption of data and keys.

type Endpoint Uses

type Endpoint struct {
    Spec       EndpointSpec        `json:",omitempty"`
    Ports      []PortConfig        `json:",omitempty"`
    VirtualIPs []EndpointVirtualIP `json:",omitempty"`

Endpoint represents an endpoint.

type EndpointSpec Uses

type EndpointSpec struct {
    Mode  ResolutionMode `json:",omitempty"`
    Ports []PortConfig   `json:",omitempty"`

EndpointSpec represents the spec of an endpoint.

type EndpointVirtualIP Uses

type EndpointVirtualIP struct {
    NetworkID string `json:",omitempty"`
    Addr      string `json:",omitempty"`

EndpointVirtualIP represents the virtual ip of a port.

type EngineDescription Uses

type EngineDescription struct {
    EngineVersion string              `json:",omitempty"`
    Labels        map[string]string   `json:",omitempty"`
    Plugins       []PluginDescription `json:",omitempty"`

EngineDescription represents the description of an engine.

type ExternalCA Uses

type ExternalCA struct {
    // Protocol is the protocol used by this external CA.
    Protocol ExternalCAProtocol

    // URL is the URL where the external CA can be reached.
    URL string

    // Options is a set of additional key/value pairs whose interpretation
    // depends on the specified CA type.
    Options map[string]string `json:",omitempty"`

ExternalCA defines external CA to be used by the cluster.

type ExternalCAProtocol Uses

type ExternalCAProtocol string

ExternalCAProtocol represents type of external CA.

const ExternalCAProtocolCFSSL ExternalCAProtocol = "cfssl"

ExternalCAProtocolCFSSL CFSSL

type GlobalService Uses

type GlobalService struct{}

GlobalService is a kind of ServiceMode.

type IPAMConfig Uses

type IPAMConfig struct {
    Subnet  string `json:",omitempty"`
    Range   string `json:",omitempty"`
    Gateway string `json:",omitempty"`

IPAMConfig represents ipam configuration.

type IPAMOptions Uses

type IPAMOptions struct {
    Driver  Driver       `json:",omitempty"`
    Configs []IPAMConfig `json:",omitempty"`

IPAMOptions represents ipam options.

type Info Uses

type Info struct {
    NodeID   string
    NodeAddr string

    LocalNodeState   LocalNodeState
    ControlAvailable bool
    Error            string

    RemoteManagers []Peer
    Nodes          int `json:",omitempty"`
    Managers       int `json:",omitempty"`

    Cluster *ClusterInfo `json:",omitempty"`

Info represents generic information about swarm.

type InitRequest Uses

type InitRequest struct {
    ListenAddr       string
    AdvertiseAddr    string
    ForceNewCluster  bool
    Spec             Spec
    AutoLockManagers bool
    Availability     NodeAvailability

InitRequest is the request used to init a swarm.

type JoinRequest Uses

type JoinRequest struct {
    ListenAddr    string
    AdvertiseAddr string
    RemoteAddrs   []string
    JoinToken     string // accept by secret
    Availability  NodeAvailability

JoinRequest is the request used to join a swarm.

type JoinTokens Uses

type JoinTokens struct {
    // Worker is the join token workers may use to join the swarm.
    Worker string
    // Manager is the join token managers may use to join the swarm.
    Manager string

JoinTokens contains the tokens workers and managers need to join the swarm.

type LocalNodeState Uses

type LocalNodeState string

LocalNodeState represents the state of the local node.

const (
    // LocalNodeStateInactive INACTIVE
    LocalNodeStateInactive LocalNodeState = "inactive"
    // LocalNodeStatePending PENDING
    LocalNodeStatePending LocalNodeState = "pending"
    // LocalNodeStateActive ACTIVE
    LocalNodeStateActive LocalNodeState = "active"
    // LocalNodeStateError ERROR
    LocalNodeStateError LocalNodeState = "error"
    // LocalNodeStateLocked LOCKED
    LocalNodeStateLocked LocalNodeState = "locked"

type ManagerStatus Uses

type ManagerStatus struct {
    Leader       bool         `json:",omitempty"`
    Reachability Reachability `json:",omitempty"`
    Addr         string       `json:",omitempty"`

ManagerStatus represents the status of a manager.

type Meta Uses

type Meta struct {
    Version   Version   `json:",omitempty"`
    CreatedAt time.Time `json:",omitempty"`
    UpdatedAt time.Time `json:",omitempty"`

Meta is a base object inherited by most of the other once.

type Network Uses

type Network struct {
    ID  string
    Spec        NetworkSpec  `json:",omitempty"`
    DriverState Driver       `json:",omitempty"`
    IPAMOptions *IPAMOptions `json:",omitempty"`

Network represents a network.

type NetworkAttachment Uses

type NetworkAttachment struct {
    Network   Network  `json:",omitempty"`
    Addresses []string `json:",omitempty"`

NetworkAttachment represents a network attachment.

type NetworkAttachmentConfig Uses

type NetworkAttachmentConfig struct {
    Target  string   `json:",omitempty"`
    Aliases []string `json:",omitempty"`

NetworkAttachmentConfig represents the configuration of a network attachment.

type NetworkSpec Uses

type NetworkSpec struct {
    DriverConfiguration *Driver      `json:",omitempty"`
    IPv6Enabled         bool         `json:",omitempty"`
    Internal            bool         `json:",omitempty"`
    Attachable          bool         `json:",omitempty"`
    Ingress             bool         `json:",omitempty"`
    IPAMOptions         *IPAMOptions `json:",omitempty"`

NetworkSpec represents the spec of a network.

type Node Uses

type Node struct {
    ID  string
    // Spec defines the desired state of the node as specified by the user.
    // The system will honor this and will *never* modify it.
    Spec NodeSpec `json:",omitempty"`
    // Description encapsulates the properties of the Node as reported by the
    // agent.
    Description NodeDescription `json:",omitempty"`
    // Status provides the current status of the node, as seen by the manager.
    Status NodeStatus `json:",omitempty"`
    // ManagerStatus provides the current status of the node's manager
    // component, if the node is a manager.
    ManagerStatus *ManagerStatus `json:",omitempty"`

Node represents a node.

type NodeAvailability Uses

type NodeAvailability string

NodeAvailability represents the availability of a node.

const (
    // NodeAvailabilityActive ACTIVE
    NodeAvailabilityActive NodeAvailability = "active"
    // NodeAvailabilityPause PAUSE
    NodeAvailabilityPause NodeAvailability = "pause"
    // NodeAvailabilityDrain DRAIN
    NodeAvailabilityDrain NodeAvailability = "drain"

type NodeDescription Uses

type NodeDescription struct {
    Hostname  string            `json:",omitempty"`
    Platform  Platform          `json:",omitempty"`
    Resources Resources         `json:",omitempty"`
    Engine    EngineDescription `json:",omitempty"`

NodeDescription represents the description of a node.

type NodeRole Uses

type NodeRole string

NodeRole represents the role of a node.

const (
    // NodeRoleWorker WORKER
    NodeRoleWorker NodeRole = "worker"
    // NodeRoleManager MANAGER
    NodeRoleManager NodeRole = "manager"

type NodeSpec Uses

type NodeSpec struct {
    Role         NodeRole         `json:",omitempty"`
    Availability NodeAvailability `json:",omitempty"`

NodeSpec represents the spec of a node.

type NodeState Uses

type NodeState string

NodeState represents the state of a node.

const (
    // NodeStateUnknown UNKNOWN
    NodeStateUnknown NodeState = "unknown"
    // NodeStateDown DOWN
    NodeStateDown NodeState = "down"
    // NodeStateReady READY
    NodeStateReady NodeState = "ready"
    // NodeStateDisconnected DISCONNECTED
    NodeStateDisconnected NodeState = "disconnected"

type NodeStatus Uses

type NodeStatus struct {
    State   NodeState `json:",omitempty"`
    Message string    `json:",omitempty"`
    Addr    string    `json:",omitempty"`

NodeStatus represents the status of a node.

type OrchestrationConfig Uses

type OrchestrationConfig struct {
    // TaskHistoryRetentionLimit is the number of historic tasks to keep per instance or
    // node. If negative, never remove completed or failed tasks.
    TaskHistoryRetentionLimit *int64 `json:",omitempty"`

OrchestrationConfig represents orchestration configuration.

type Peer Uses

type Peer struct {
    NodeID string
    Addr   string

Peer represents a peer.

type Placement Uses

type Placement struct {
    Constraints []string              `json:",omitempty"`
    Preferences []PlacementPreference `json:",omitempty"`

Placement represents orchestration parameters.

type PlacementPreference Uses

type PlacementPreference struct {
    Spread *SpreadOver

PlacementPreference provides a way to make the scheduler aware of factors such as topology.

type Platform Uses

type Platform struct {
    Architecture string `json:",omitempty"`
    OS           string `json:",omitempty"`

Platform represents the platform (Arch/OS).

type PluginDescription Uses

type PluginDescription struct {
    Type string `json:",omitempty"`
    Name string `json:",omitempty"`

PluginDescription represents the description of an engine plugin.

type PortConfig Uses

type PortConfig struct {
    Name     string             `json:",omitempty"`
    Protocol PortConfigProtocol `json:",omitempty"`
    // TargetPort is the port inside the container
    TargetPort uint32 `json:",omitempty"`
    // PublishedPort is the port on the swarm hosts
    PublishedPort uint32 `json:",omitempty"`
    // PublishMode is the mode in which port is published
    PublishMode PortConfigPublishMode `json:",omitempty"`

PortConfig represents the config of a port.

type PortConfigProtocol Uses

type PortConfigProtocol string

PortConfigProtocol represents the protocol of a port.

const (

    // PortConfigProtocolTCP TCP
    PortConfigProtocolTCP PortConfigProtocol = "tcp"
    // PortConfigProtocolUDP UDP
    PortConfigProtocolUDP PortConfigProtocol = "udp"

type PortConfigPublishMode Uses

type PortConfigPublishMode string

PortConfigPublishMode represents the mode in which the port is to be published.

const (
    // PortConfigPublishModeIngress is used for ports published
    // for ingress load balancing using routing mesh.
    PortConfigPublishModeIngress PortConfigPublishMode = "ingress"
    // PortConfigPublishModeHost is used for ports published
    // for direct host level access on the host where the task is running.
    PortConfigPublishModeHost PortConfigPublishMode = "host"

type PortStatus Uses

type PortStatus struct {
    Ports []PortConfig `json:",omitempty"`

PortStatus represents the port status of a task's host ports whose service has published host ports

type RaftConfig Uses

type RaftConfig struct {
    // SnapshotInterval is the number of log entries between snapshots.
    SnapshotInterval uint64 `json:",omitempty"`

    // KeepOldSnapshots is the number of snapshots to keep beyond the
    // current snapshot.
    KeepOldSnapshots *uint64 `json:",omitempty"`

    // LogEntriesForSlowFollowers is the number of log entries to keep
    // around to sync up slow followers after a snapshot is created.
    LogEntriesForSlowFollowers uint64 `json:",omitempty"`

    // ElectionTick is the number of ticks that a follower will wait for a message
    // from the leader before becoming a candidate and starting an election.
    // ElectionTick must be greater than HeartbeatTick.
    // A tick currently defaults to one second, so these translate directly to
    // seconds currently, but this is NOT guaranteed.
    ElectionTick int

    // HeartbeatTick is the number of ticks between heartbeats. Every
    // HeartbeatTick ticks, the leader will send a heartbeat to the
    // followers.
    // A tick currently defaults to one second, so these translate directly to
    // seconds currently, but this is NOT guaranteed.
    HeartbeatTick int

RaftConfig represents raft configuration.

type Reachability Uses

type Reachability string

Reachability represents the reachability of a node.

const (
    // ReachabilityUnknown UNKNOWN
    ReachabilityUnknown Reachability = "unknown"
    // ReachabilityUnreachable UNREACHABLE
    ReachabilityUnreachable Reachability = "unreachable"
    // ReachabilityReachable REACHABLE
    ReachabilityReachable Reachability = "reachable"

type ReplicatedService Uses

type ReplicatedService struct {
    Replicas *uint64 `json:",omitempty"`

ReplicatedService is a kind of ServiceMode.

type ResolutionMode Uses

type ResolutionMode string

ResolutionMode represents a resolution mode.

const (
    // ResolutionModeVIP VIP
    ResolutionModeVIP ResolutionMode = "vip"
    // ResolutionModeDNSRR DNSRR
    ResolutionModeDNSRR ResolutionMode = "dnsrr"

type ResourceRequirements Uses

type ResourceRequirements struct {
    Limits       *Resources `json:",omitempty"`
    Reservations *Resources `json:",omitempty"`

ResourceRequirements represents resources requirements.

type Resources Uses

type Resources struct {
    NanoCPUs    int64 `json:",omitempty"`
    MemoryBytes int64 `json:",omitempty"`

Resources represents resources (CPU/Memory).

type RestartPolicy Uses

type RestartPolicy struct {
    Condition   RestartPolicyCondition `json:",omitempty"`
    Delay       *time.Duration         `json:",omitempty"`
    MaxAttempts *uint64                `json:",omitempty"`
    Window      *time.Duration         `json:",omitempty"`

RestartPolicy represents the restart policy.

type RestartPolicyCondition Uses

type RestartPolicyCondition string

RestartPolicyCondition represents when to restart.

const (
    // RestartPolicyConditionNone NONE
    RestartPolicyConditionNone RestartPolicyCondition = "none"
    // RestartPolicyConditionOnFailure ON_FAILURE
    RestartPolicyConditionOnFailure RestartPolicyCondition = "on-failure"
    // RestartPolicyConditionAny ANY
    RestartPolicyConditionAny RestartPolicyCondition = "any"

type Secret Uses

type Secret struct {
    ID  string
    Spec SecretSpec

Secret represents a secret.

type SecretReference Uses

type SecretReference struct {
    File       *SecretReferenceFileTarget
    SecretID   string
    SecretName string

SecretReference is a reference to a secret in swarm

type SecretReferenceFileTarget Uses

type SecretReferenceFileTarget struct {
    Name string
    UID  string
    GID  string
    Mode os.FileMode

SecretReferenceFileTarget is a file target in a secret reference

type SecretSpec Uses

type SecretSpec struct {
    Data []byte `json:",omitempty"`

SecretSpec represents a secret specification from a secret in swarm

type Service Uses

type Service struct {
    ID  string
    Spec         ServiceSpec   `json:",omitempty"`
    PreviousSpec *ServiceSpec  `json:",omitempty"`
    Endpoint     Endpoint      `json:",omitempty"`
    UpdateStatus *UpdateStatus `json:",omitempty"`

Service represents a service.

type ServiceMode Uses

type ServiceMode struct {
    Replicated *ReplicatedService `json:",omitempty"`
    Global     *GlobalService     `json:",omitempty"`

ServiceMode represents the mode of a service.

type ServiceSpec Uses

type ServiceSpec struct {

    // TaskTemplate defines how the service should construct new tasks when
    // orchestrating this service.
    TaskTemplate   TaskSpec      `json:",omitempty"`
    Mode           ServiceMode   `json:",omitempty"`
    UpdateConfig   *UpdateConfig `json:",omitempty"`
    RollbackConfig *UpdateConfig `json:",omitempty"`

    // Networks field in ServiceSpec is deprecated. The
    // same field in TaskSpec should be used instead.
    // This field will be removed in a future release.
    Networks     []NetworkAttachmentConfig `json:",omitempty"`
    EndpointSpec *EndpointSpec             `json:",omitempty"`

ServiceSpec represents the spec of a service.

type Spec Uses

type Spec struct {

    Orchestration    OrchestrationConfig `json:",omitempty"`
    Raft             RaftConfig          `json:",omitempty"`
    Dispatcher       DispatcherConfig    `json:",omitempty"`
    CAConfig         CAConfig            `json:",omitempty"`
    TaskDefaults     TaskDefaults        `json:",omitempty"`
    EncryptionConfig EncryptionConfig    `json:",omitempty"`

Spec represents the spec of a swarm.

type SpreadOver Uses

type SpreadOver struct {
    // label descriptor, such as
    SpreadDescriptor string

SpreadOver is a scheduling preference that instructs the scheduler to spread tasks evenly over groups of nodes identified by labels.

type Swarm Uses

type Swarm struct {
    JoinTokens JoinTokens

Swarm represents a swarm.

type Task Uses

type Task struct {
    ID  string

    Spec                TaskSpec            `json:",omitempty"`
    ServiceID           string              `json:",omitempty"`
    Slot                int                 `json:",omitempty"`
    NodeID              string              `json:",omitempty"`
    Status              TaskStatus          `json:",omitempty"`
    DesiredState        TaskState           `json:",omitempty"`
    NetworksAttachments []NetworkAttachment `json:",omitempty"`

Task represents a task.

type TaskDefaults Uses

type TaskDefaults struct {
    // LogDriver selects the log driver to use for tasks created in the
    // orchestrator if unspecified by a service.
    // Updating this value will only have an affect on new tasks. Old tasks
    // will continue use their previously configured log driver until
    // recreated.
    LogDriver *Driver `json:",omitempty"`

TaskDefaults parameterizes cluster-level task creation with default values.

type TaskSpec Uses

type TaskSpec struct {
    ContainerSpec ContainerSpec             `json:",omitempty"`
    Resources     *ResourceRequirements     `json:",omitempty"`
    RestartPolicy *RestartPolicy            `json:",omitempty"`
    Placement     *Placement                `json:",omitempty"`
    Networks      []NetworkAttachmentConfig `json:",omitempty"`

    // LogDriver specifies the LogDriver to use for tasks created from this
    // spec. If not present, the one on cluster default on swarm.Spec will be
    // used, finally falling back to the engine default if not specified.
    LogDriver *Driver `json:",omitempty"`

    // ForceUpdate is a counter that triggers an update even if no relevant
    // parameters have been changed.
    ForceUpdate uint64

TaskSpec represents the spec of a task.

type TaskState Uses

type TaskState string

TaskState represents the state of a task.

const (
    // TaskStateNew NEW
    TaskStateNew TaskState = "new"
    // TaskStateAllocated ALLOCATED
    TaskStateAllocated TaskState = "allocated"
    // TaskStatePending PENDING
    TaskStatePending TaskState = "pending"
    // TaskStateAssigned ASSIGNED
    TaskStateAssigned TaskState = "assigned"
    // TaskStateAccepted ACCEPTED
    TaskStateAccepted TaskState = "accepted"
    // TaskStatePreparing PREPARING
    TaskStatePreparing TaskState = "preparing"
    // TaskStateReady READY
    TaskStateReady TaskState = "ready"
    // TaskStateStarting STARTING
    TaskStateStarting TaskState = "starting"
    // TaskStateRunning RUNNING
    TaskStateRunning TaskState = "running"
    // TaskStateComplete COMPLETE
    TaskStateComplete TaskState = "complete"
    // TaskStateShutdown SHUTDOWN
    TaskStateShutdown TaskState = "shutdown"
    // TaskStateFailed FAILED
    TaskStateFailed TaskState = "failed"
    // TaskStateRejected REJECTED
    TaskStateRejected TaskState = "rejected"

type TaskStatus Uses

type TaskStatus struct {
    Timestamp       time.Time       `json:",omitempty"`
    State           TaskState       `json:",omitempty"`
    Message         string          `json:",omitempty"`
    Err             string          `json:",omitempty"`
    ContainerStatus ContainerStatus `json:",omitempty"`
    PortStatus      PortStatus      `json:",omitempty"`

TaskStatus represents the status of a task.

type UnlockRequest Uses

type UnlockRequest struct {
    // UnlockKey is the unlock key in ASCII-armored format.
    UnlockKey string

UnlockRequest is the request used to unlock a swarm.

type UpdateConfig Uses

type UpdateConfig struct {
    // Maximum number of tasks to be updated in one iteration.
    // 0 means unlimited parallelism.
    Parallelism uint64

    // Amount of time between updates.
    Delay time.Duration `json:",omitempty"`

    // FailureAction is the action to take when an update failures.
    FailureAction string `json:",omitempty"`

    // Monitor indicates how long to monitor a task for failure after it is
    // created. If the task fails by ending up in one of the states
    // REJECTED, COMPLETED, or FAILED, within Monitor from its creation,
    // this counts as a failure. If it fails after Monitor, it does not
    // count as a failure. If Monitor is unspecified, a default value will
    // be used.
    Monitor time.Duration `json:",omitempty"`

    // MaxFailureRatio is the fraction of tasks that may fail during
    // an update before the failure action is invoked. Any task created by
    // the current update which ends up in one of the states REJECTED,
    // COMPLETED or FAILED within Monitor from its creation counts as a
    // failure. The number of failures is divided by the number of tasks
    // being updated, and if this fraction is greater than
    // MaxFailureRatio, the failure action is invoked.
    // If the failure action is CONTINUE, there is no effect.
    // If the failure action is PAUSE, no more tasks will be updated until
    // another update is started.
    MaxFailureRatio float32

UpdateConfig represents the update configuration.

type UpdateFlags Uses

type UpdateFlags struct {
    RotateWorkerToken      bool
    RotateManagerToken     bool
    RotateManagerUnlockKey bool

UpdateFlags contains flags for SwarmUpdate.

type UpdateState Uses

type UpdateState string

UpdateState is the state of a service update.

const (
    // UpdateStateUpdating is the updating state.
    UpdateStateUpdating UpdateState = "updating"
    // UpdateStatePaused is the paused state.
    UpdateStatePaused UpdateState = "paused"
    // UpdateStateCompleted is the completed state.
    UpdateStateCompleted UpdateState = "completed"
    // UpdateStateRollbackStarted is the state with a rollback in progress.
    UpdateStateRollbackStarted UpdateState = "rollback_started"
    // UpdateStateRollbackPaused is the state with a rollback in progress.
    UpdateStateRollbackPaused UpdateState = "rollback_paused"
    // UpdateStateRollbackCompleted is the state with a rollback in progress.
    UpdateStateRollbackCompleted UpdateState = "rollback_completed"

type UpdateStatus Uses

type UpdateStatus struct {
    State       UpdateState `json:",omitempty"`
    StartedAt   *time.Time  `json:",omitempty"`
    CompletedAt *time.Time  `json:",omitempty"`
    Message     string      `json:",omitempty"`

UpdateStatus reports the status of a service update.

type Version Uses

type Version struct {
    Index uint64 `json:",omitempty"`

Version represents the internal object version.

Package swarm imports 4 packages (graph) and is imported by 532 packages. Updated 2017-03-29. Refresh now. Tools for package owners.