task

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2026 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ContextKey

type ContextKey string
const (
	ContextKeyBotClientRef ContextKey = "botClientRef"
)

type ContextKeyMap

type ContextKeyMap map[ContextKey]any

type Task

type Task interface {
	Start()
	StartNoWait()
	Stop()
	Status() TaskStatus
}

func New

func New(name string, exec func(ctx context.Context), contextValues map[ContextKey]any, interval time.Duration) Task

type TaskStatus

type TaskStatus int
const (
	TaskStatusNotStarted TaskStatus = iota
	TaskStatusRunning
	TaskStatusStopped
)

Jump to

Keyboard shortcuts

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