coordinator

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2023 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MIN_PORT = 8000
	MAX_PORT = 8100
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Broker    mq.Broker
	DataStore datastore.Datastore
	Address   string
	Queues    map[string]int
}

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

Jump to

Keyboard shortcuts

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