package jobs

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

Index

Types

type Orchestrator

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

Orchestrator is the combined orchestrator controlling both Global and Replicated Jobs. Initially, these job types were two separate orchestrators, like the Replicated and Global orchestrators. However, it became apparent that because of the simplicity of Jobs as compared to Services, one combined orchestrator suffices for both job types.

func NewOrchestrator

func NewOrchestrator(store *store.MemoryStore) *Orchestrator

func (*Orchestrator) Run

func (o *Orchestrator) Run(ctx context.Context)

Run runs the Orchestrator reconciliation loop. It takes a context as an argument, but canceling this context will not stop the routine; this context is only for passing in logging information. Call Stop to stop the Orchestrator

func (*Orchestrator) Stop

func (o *Orchestrator) Stop()

Stop stops the Orchestrator

type Reconciler

type Reconciler interface {
	taskinit.InitHandler

	ReconcileService(id string) error
}

Reconciler is the type that holds the reconciliation logic for the orchestrator. It exists so that the logic of actually reconciling and writing to the store is separated from the orchestrator, to make the event handling logic in the orchestrator easier to test.

Source Files

orchestrator.go

Directories

PathSynopsis
manager/orchestrator/jobs/global
manager/orchestrator/jobs/replicated
Version
v2.0.0-20250103191802-8c1959736554 (latest)
Published
Jan 3, 2025
Platform
linux/amd64
Imports
11 packages
Last checked
1 day ago

Tools for package owners.