monitor

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2026 License: AGPL-3.0 Imports: 10 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package monitor implements the heart of the application, so to speak.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Monitor

type Monitor struct {
	CmdQ chan command.Command
	// contains filtered or unexported fields
}

Monitor handles the Job queue, submitting job, executing them, cleaning up after them.

func Create

func Create() (*Monitor, error)

Create creates and returns a new Monitor.

func (*Monitor) Active

func (mon *Monitor) Active() bool

Active returns the Monitor's active flag.

func (*Monitor) GetQueuedJobs added in v0.2.0

func (mon *Monitor) GetQueuedJobs() ([]*model.Job, error)

GetQueuedJobs returns a slice of the currently enqueued Jobs.

func (*Monitor) Start

func (mon *Monitor) Start()

Start starts the Monitor's main loop in a separate goroutine.

func (*Monitor) Stop

func (mon *Monitor) Stop()

Stop clears the Monitor's active flag.

func (*Monitor) SubmitJob

func (mon *Monitor) SubmitJob(job *model.Job) error

SubmitJob places a new Job in the Job queue and saves it to the Database.

Directories

Path Synopsis
Package command provides symbolic constants to identifiy commands sent to the Monitor.
Package command provides symbolic constants to identifiy commands sent to the Monitor.

Jump to

Keyboard shortcuts

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