manager

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ID           string
	Input        core.Input
	Processors   []core.Processor
	Outputs      []core.Output
	SaveState    core.SaveStateFunc
	LoadState    core.LoadStateFunc
	ErrorHandler core.ErrorHandler
}

type Manager

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

func New

func New(config Config) *Manager

func (*Manager) ID

func (manager *Manager) ID() string

func (*Manager) Run

func (manager *Manager) Run()

Run should be run as a go routine as it blocks until the manager context is closed

func (*Manager) Status

func (manager *Manager) Status() *Status

func (*Manager) Stop

func (manager *Manager) Stop()

type Status

type Status struct {
	Running                   bool      `json:"running"`
	Errors                    []error   `json:"errors"`
	LastSuccessfulRun         time.Time `json:"last_successful_run"`
	LastSuccessfulResultCount int       `json:"last_successful_result_count"`
	HasErrors                 bool      `json:"has_errors"`
	ErrorsSinceSuccessfulRun  int       `json:"errors_since_successful_run"`
}

type StatusHandler

type StatusHandler func(status Status)

Jump to

Keyboard shortcuts

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