bgtasks

package
v0.0.0-...-be78b2b Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2024 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BgTaskRegistry = []BackgroundTask{}

Functions

func StartAllTasks

func StartAllTasks()

Types

type BackgroundTask

type BackgroundTask interface {
	// Whether or not the task is enabled
	Enabled() bool

	// How often the task should run
	Duration() time.Duration

	// Name of the task
	Name() string

	// Description of the task
	Description() string

	// Function to run the task
	Run() error
}

Inspired from https://github.com/InfinityBotList/Arcadia/blob/main/src/tasks/taskcat.rs

Jump to

Keyboard shortcuts

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