FlyTasks

package
v0.0.0-...-741ab34 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2024 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 FlyLoopTask

type FlyLoopTask struct {
	Ctx    context.Context
	Cancel context.CancelFunc
	Done   chan struct{}

	HandleFunc func() error
	Interval   int
	IsRunning  bool
	Error      error
}

func NewFlyLoopTask

func NewFlyLoopTask() *FlyLoopTask

func (*FlyLoopTask) Run

func (s *FlyLoopTask) Run(Interval int, f func() error) error

func (*FlyLoopTask) SetFunc

func (s *FlyLoopTask) SetFunc(f func() error)

func (*FlyLoopTask) SetInterval

func (s *FlyLoopTask) SetInterval(Interval int)

func (*FlyLoopTask) Start

func (s *FlyLoopTask) Start() error

func (*FlyLoopTask) Stop

func (s *FlyLoopTask) Stop() error

func (*FlyLoopTask) Wait

func (s *FlyLoopTask) Wait()

Jump to

Keyboard shortcuts

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