jobs

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func List

func List() map[string]*Job

List returns a map of registered jobs.

func Register

func Register(name string, runner Runner)

Register registers a job.

Types

type Job

type Job struct {
	ID     int
	Runner Runner
}

Job is a job that can be registered with the scheduler.

type Runner

type Runner interface {
	Spec(context.Context) string
	Func(context.Context) func()
}

Runner is a job runner.

Jump to

Keyboard shortcuts

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