task

package
v0.180.0 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2021 License: Apache-2.0 Imports: 1 Imported by: 3

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 (*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