task

package
v0.0.0-...-8934242 Latest Latest
Warning

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

Go to latest
Published: May 29, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Messager

type Messager interface {
	Send(format string, args ...any)
}

type Task

type Task struct {
	Name       string   `yaml:"name"`
	Dir        string   `yaml:"dir"`
	Entrypoint []string `yaml:"entrypoint"`
	// contains filtered or unexported fields
}

func (*Task) Do

func (t *Task) Do(op string) string

func (*Task) Loop

func (t *Task) Loop(msg Messager)

func (*Task) Update

func (t *Task) Update(t2 *Task)

type Tasks

type Tasks struct {
	Tasks map[string]*Task
	// contains filtered or unexported fields
}

func StartFromConfig

func StartFromConfig(filename string, msgr Messager) (*Tasks, error)

func (*Tasks) Close

func (t *Tasks) Close()

func (*Tasks) Get

func (ts *Tasks) Get(name string) *Task

func (*Tasks) Reload

func (ts *Tasks) Reload() error

func (*Tasks) StopAll

func (ts *Tasks) StopAll()

type TasksConfig

type TasksConfig struct {
	Tasks []*Task `yaml:"task"`
}

func ParseYAML

func ParseYAML(data []byte) (TasksConfig, error)

Jump to

Keyboard shortcuts

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