scheduler

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Scheduler

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

Don't use directly, to use call:

s := scheduler.NewScheduler(yourCallback)

func NewScheduler

func NewScheduler(callback func()) *Scheduler

Call to create a scheduler with the callback function to use

Things like this will work in the callback

var counter int
func callback() {
	counter++
}()

func (*Scheduler) ChangeInterval

func (s *Scheduler) ChangeInterval(newInterval time.Duration)

Call with a time.Duration to change the interval at witch the scheduler runs

Had to force it to be non blocking as it would block in some scenarios

func (*Scheduler) Start

func (s *Scheduler) Start()

Call to start the scheduler

func (*Scheduler) Stop

func (s *Scheduler) Stop()

Call to stop the scheduler

Technically safe to call without first calling

Sheduler.Start()

Jump to

Keyboard shortcuts

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