task

package
v0.0.0-...-049f766 Latest Latest
Warning

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

Go to latest
Published: May 25, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ScheduledTask

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

ScheduledTask represents a scheduled task.

func NewScheduledTask

func NewScheduledTask(do func(), duration time.Duration) *ScheduledTask

NewScheduledTask returns a ScheduledTask.

func (ScheduledTask) SetDuration

func (s ScheduledTask) SetDuration(duration time.Duration)

SetDuration sets the interval for scheduling tasks.

func (*ScheduledTask) Start

func (s *ScheduledTask) Start()

Start starts scheduling tasks.

func (*ScheduledTask) Stop

func (s *ScheduledTask) Stop()

Stop gracefully stop a scheduled task.

Jump to

Keyboard shortcuts

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