executor

package
v0.2102.6 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Flags has the configuration flags.

Functions

This section is empty.

Types

type Worker

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

Worker is an executor worker handling many runtimes.

func New

func New(
	dataDir string,
	commonWorker *workerCommon.Worker,
	registration *registration.Worker,
) (*Worker, error)

New creates a new executor worker.

func (*Worker) Cleanup

func (w *Worker) Cleanup()

Cleanup performs the service specific post-termination cleanup.

func (*Worker) Enabled

func (w *Worker) Enabled() bool

Enabled returns if worker is enabled.

func (*Worker) GetRuntime

func (w *Worker) GetRuntime(id common.Namespace) *committee.Node

GetRuntime returns a registered runtime.

In case the runtime with the specified id was not registered it returns nil.

func (*Worker) Initialized

func (w *Worker) Initialized() <-chan struct{}

Initialized returns a channel that will be closed when the executor worker is initialized and ready to service requests.

func (*Worker) Name

func (w *Worker) Name() string

Name returns the service name.

func (*Worker) Quit

func (w *Worker) Quit() <-chan struct{}

Quit returns a channel that will be closed when the service terminates.

func (*Worker) Start

func (w *Worker) Start() error

Start starts the service.

func (*Worker) Stop

func (w *Worker) Stop()

Stop halts the service.

Directories

Path Synopsis
Package tests is a collection of worker test cases.
Package tests is a collection of worker test cases.

Jump to

Keyboard shortcuts

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