workerhandler

package
v0.0.0-...-92ca402 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2024 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

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

func New

func New(c Config) *Handler

func (*Handler) Hand

func (h *Handler) Hand() []Interface

type Interface

type Interface interface {
	// Create provides a task template that should be created upon process
	// initiation. The task template should describe scheduled tasks that this
	// handler is going to process. If the handler does not want to bootstrap any
	// task template, nil is returned.
	Create() *task.Task
	// Ensure executes the handler specific business logic in order to complete
	// the given task, if possible.
	Ensure(*task.Task) error
	// Filter expresses whether the handler wants to process the given task.
	Filter(*task.Task) bool
}

Jump to

Keyboard shortcuts

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