tasks_api

package
v0.0.25 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2025 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Registry added in v0.0.12

type Registry interface {
	Register(task Task)
	Run(ctx context.Context) error
}

type Task

type Task interface {
	NameBase() string
	NameInit() string
	NameExit() string
	RunInit(ctx context.Context) error
	RunExit() error
	State() bool // true when the initialized and not yet exited
}

Pairs of Task to be run

type TaskUnit

type TaskUnit interface {
	Name() string
	Run() error
}

Task to be run

Jump to

Keyboard shortcuts

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