task

package
v2.16.0 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Runner

type Runner interface {
	Run() error
}

type TickerTask

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

func NewTickerTask

func NewTickerTask(interval time.Duration, runner Runner) *TickerTask

func NewTickerTaskFromFunc

func NewTickerTaskFromFunc(interval time.Duration, runner func() error) *TickerTask

func (*TickerTask) Start

func (t *TickerTask) Start()

Start runs the task immediately and then schedules the task to run periodically if a positive fetching interval has been specified.

func (*TickerTask) Stop

func (t *TickerTask) Stop()

Stop stops the periodic task but the task runner maintains state

Jump to

Keyboard shortcuts

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