package replicated

import "github.com/moby/swarmkit/v2/manager/orchestrator/replicated"

Index

Types

type Orchestrator

type Orchestrator struct {
	// contains filtered or unexported fields
}

An Orchestrator runs a reconciliation loop to create and destroy tasks as necessary for the replicated services.

func NewReplicatedOrchestrator

func NewReplicatedOrchestrator(store *store.MemoryStore) *Orchestrator

NewReplicatedOrchestrator creates a new replicated Orchestrator.

func (*Orchestrator) FixTask

func (r *Orchestrator) FixTask(ctx context.Context, batch *store.Batch, t *api.Task)

FixTask validates a task with the current cluster settings, and takes action to make it conformant. it's called at orchestrator initialization.

func (*Orchestrator) IsRelatedService

func (r *Orchestrator) IsRelatedService(service *api.Service) bool

IsRelatedService returns true if the service should be governed by this orchestrator

func (*Orchestrator) Run

func (r *Orchestrator) Run(ctx context.Context) error

Run contains the orchestrator event loop. It runs until Stop is called.

func (*Orchestrator) SlotTuple

func (r *Orchestrator) SlotTuple(t *api.Task) orchestrator.SlotTuple

SlotTuple returns a slot tuple for the replicated service task.

func (*Orchestrator) Stop

func (r *Orchestrator) Stop()

Stop stops the orchestrator.

Source Files

replicated.go services.go slot.go tasks.go

Version
v2.0.0-20250103191802-8c1959736554 (latest)
Published
Jan 3, 2025
Platform
linux/amd64
Imports
11 packages
Last checked
1 week ago

Tools for package owners.