workerbee

package
v0.1.65 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package workerbee provides a simple worker that executes tasks at regular cron intervals The worker initializes OpenTelemetry tracing and metrics providers based on the provided configuration.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrNoTasks

type ErrNoTasks struct{}

func (*ErrNoTasks) Error

func (e *ErrNoTasks) Error() string

type Task

type Task func(ctx context.Context) error

type Worker

type Worker struct {
	// contains filtered or unexported fields
}

func NewWorker

func NewWorker(config config.Telemetry, interval time.Duration) *Worker

func (*Worker) AddTask

func (w *Worker) AddTask(fn Task)

func (*Worker) Run

func (w *Worker) Run() error

func (*Worker) Stop

func (w *Worker) Stop()

Jump to

Keyboard shortcuts

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