poller

package
v0.8.9 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2025 License: MIT, Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RandRun added in v0.3.9

func RandRun(ctx context.Context, minInterval, maxInterval time.Duration, do TaskFunc)

func Run added in v0.3.9

func Run(ctx context.Context, interval time.Duration, do TaskFunc)

Types

type Poller

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

func NewPoller

func NewPoller() *Poller

func (*Poller) RandRun

func (task *Poller) RandRun(ctx context.Context, minInterval, maxInterval time.Duration, do TaskFunc)

func (*Poller) Run

func (task *Poller) Run(ctx context.Context, interval time.Duration, do TaskFunc)

func (*Poller) Times

func (task *Poller) Times() uint

type TaskFunc

type TaskFunc = func(context.Context)

Jump to

Keyboard shortcuts

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