coordinator

package
v0.1.162 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2026 License: MIT Imports: 20 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Name       string
	Broker     broker.Broker
	DataStore  datastore.Datastore
	Locker     locker.Locker
	Address    string
	Queues     map[string]int
	Endpoints  map[string]web.HandlerFunc
	Enabled    map[string]bool
	Middleware Middleware
}

type Coordinator

type Coordinator struct {
	Name string
	// contains filtered or unexported fields
}

Coordinator is responsible for accepting tasks from clients, scheduling tasks for workers to execute and for exposing the cluster's state to the outside world.

func NewCoordinator

func NewCoordinator(cfg Config) (*Coordinator, error)

func (*Coordinator) Start

func (c *Coordinator) Start() error

func (*Coordinator) Stop

func (c *Coordinator) Stop() error

func (*Coordinator) SubmitJob added in v0.1.7

func (c *Coordinator) SubmitJob(ctx context.Context, ij *input.Job) (*tork.Job, error)

type Middleware added in v0.1.6

type Middleware struct {
	Web  []web.MiddlewareFunc
	Task []task.MiddlewareFunc
	Job  []job.MiddlewareFunc
	Node []node.MiddlewareFunc
	Log  []logmw.MiddlewareFunc
	Echo []echo.MiddlewareFunc
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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