github.com/kaisenlinux/docker.io@v0.0.0-20230510090727-ea55db55fac7/swarmkit/manager/orchestrator/slot.go (about)

     1  package orchestrator
     2  
     3  import (
     4  	"github.com/docker/swarmkit/api"
     5  )
     6  
     7  // Slot is a list of the running tasks occupying a certain slot. Generally this
     8  // will only be one task, but some rolling update situations involve
     9  // temporarily having two running tasks in the same slot. Note that this use of
    10  // "slot" is more generic than the Slot number for replicated services - a node
    11  // is also considered a slot for global services.
    12  type Slot []*api.Task
    13  
    14  // SlotTuple identifies a unique slot, in the broad sense described above. It's
    15  // a combination of either a service ID and a slot number (replicated services),
    16  // or a service ID and a node ID (global services).
    17  type SlotTuple struct {
    18  	Slot      uint64 // unset for global service tasks
    19  	ServiceID string
    20  	NodeID    string // unset for replicated service tasks
    21  }