polling

package
v1.3.11 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2023 License: GPL-3.0 Imports: 7 Imported by: 4 modules, 4 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidValue = errors.New("invalid value")

ErrInvalidValue signals that an invalid value was provided

View Source
var ErrLoopAlreadyStarted = errors.New("loop already started")

ErrLoopAlreadyStarted signals that a loop has already been started

View Source
var ErrNilExecutor = errors.New("nil executor")

ErrNilExecutor signals that a nil executor instance has been provided

View Source
var ErrNilLogger = errors.New("nil logger")

ErrNilLogger signals that a nil logger was provided

Functions

func NewPollingHandler

func NewPollingHandler(args ArgsPollingHandler) (*pollingHandler, error)

NewPollingHandler will create a new polling handler instance

Types

type ArgsPollingHandler

type ArgsPollingHandler struct {
	Log              logger.Logger
	Name             string
	PollingInterval  time.Duration
	PollingWhenError time.Duration
	Executor         Executor
}

ArgsPollingHandler is the DTO used in the polling handler constructor

type Executor

type Executor interface {
	Execute(ctx context.Context) error
	IsInterfaceNil() bool
}

Executor defines the behavior of a component able to execute a certain task. This will be continuously called by the polling handler

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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