engine

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2023 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config added in v0.1.5

type Config struct {
	Mode       Mode
	Middleware Middleware
	Endpoints  map[string]web.HandlerFunc
}

type Engine

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

func New

func New(cfg Config) *Engine

func (*Engine) OnStarted

func (e *Engine) OnStarted(h OnStartedHandler)

func (*Engine) Start

func (e *Engine) Start() error

func (*Engine) Terminate

func (e *Engine) Terminate()

type Middleware added in v0.1.5

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

type Mode

type Mode string
const (
	ModeCoordinator Mode = "coordinator"
	ModeWorker      Mode = "worker"
	ModeStandalone  Mode = "standalone"
)

type OnStartedHandler

type OnStartedHandler func() error

OnStartedHandler a bootstrap hook that is called after Tork has finished starting up. If a non-nil error is returned it will terminate the bootstrap process.

Jump to

Keyboard shortcuts

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