tasklet

package
v1.0.0-develop.10 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MustRun

func MustRun(runner Runner, opts Opts)

func Run

func Run(runner Runner, opts Opts) error

Types

type Opts

type Opts struct {
	Signal  chan os.Signal
	Timeout time.Duration
}

type Runner

type Runner struct {
	Runner   TaskletFn
	StartMsg string
	StopMsg  string
}

type TaskletContext

type TaskletContext interface {
	Spinner() *pterm.SpinnerPrinter
}

type TaskletFn

type TaskletFn func(TaskletContext) error

Jump to

Keyboard shortcuts

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