scheduler

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2025 License: AGPL-3.0 Imports: 17 Imported by: 0

Documentation

Overview

Package scheduler provides the logic to schedule tasks and execute them.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Scheduler

type Scheduler struct {
	TaskQ chan Task
	// contains filtered or unexported fields
}

Scheduler wraps the state needed to schedule the scanning of networks, probing of devices, possibly other tasks, too.

func Create

func Create(sc *scanner.NetworkScanner) (*Scheduler, error)

Create returns a fresh Scheduler.

func (*Scheduler) IsActive

func (s *Scheduler) IsActive() bool

IsActive returns the state of the Scheduler's active flag.

func (*Scheduler) Start

func (s *Scheduler) Start()

Start starts the Scheduler's main loop.

func (*Scheduler) Stop

func (s *Scheduler) Stop()

Stop clears the Scheduler's active flag.

type Task

type Task struct {
	Kind     task.Tag
	ObjectID int64
}

Task defines describes a Task. Aren't you sorry, you asked?

Directories

Path Synopsis
Package task defines constants to refer to Task types
Package task defines constants to refer to Task types

Jump to

Keyboard shortcuts

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