poller

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package poller contains code that is in charge of periodically executing a given function every x seconds, where x is a customizable parameter.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Poller

type Poller interface {
	// Start the poller
	Start() error
	// SetPollFunction sets the function that must be called
	SetPollFunction(fn)
}

Poller periodically executes a given function

func New

func New(ctx context.Context, interval int) Poller

New returns a new instance of a poller

Jump to

Keyboard shortcuts

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