jobs

package
v0.0.0-...-3e31364 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 1, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL