service

package
v0.0.0-...-f003305 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: MPL-2.0 Imports: 6 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func JobWorker

func JobWorker(ctx context.Context, job func(context.Context) (bool, error), duration time.Duration)

JobWorker - a job worker

Types

type Job

type Job struct {
	Func    JobFunc
	Workers int
	Cadence time.Duration
}

Job - Structure defining what a common job meta-information

type JobFunc

type JobFunc func(context.Context) (bool, error)

JobFunc - type that defines what a Job Function should look like

type JobService

type JobService interface {
	Jobs() []Job
}

JobService - interface defining what can have jobs

Jump to

Keyboard shortcuts

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