monitor

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service interface {
	Start(startChannel chan bool)
	Stop()
	IsRunning() bool
	Observable() rxgo.Observable
	RunningTimesheet() models.Timesheet
	SetRunningTimesheet(timesheet models.Timesheet)
	TimesheetStatus() int
	SetTimesheetStatus(status int)
	TimesheetError() error
	SetTimesheetError(err error)
}

Service is the interface to the monitor service functions

func NewService

func NewService(quitChannel chan bool) Service

NewService returns an initialized Service using the supplied quit channel

type ServiceData

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

ServiceData is the main data struct of the Service

func (*ServiceData) IsRunning

func (m *ServiceData) IsRunning() bool

IsRunning returns the running status of the monitor

func (*ServiceData) Observable

func (m *ServiceData) Observable() rxgo.Observable

Observable returns an RxGo Observable for the monitor's command channel

func (*ServiceData) RunningTimesheet

func (m *ServiceData) RunningTimesheet() models.Timesheet

func (*ServiceData) SetRunningTimesheet

func (m *ServiceData) SetRunningTimesheet(timesheet models.Timesheet)

func (*ServiceData) SetTimesheetError

func (m *ServiceData) SetTimesheetError(err error)

func (*ServiceData) SetTimesheetStatus

func (m *ServiceData) SetTimesheetStatus(status int)

func (*ServiceData) Start

func (m *ServiceData) Start(startChannel chan bool)

Start starts the monitor, optionally using a start channel

func (*ServiceData) Stop

func (m *ServiceData) Stop()

Stop stops the monitor

func (*ServiceData) TimesheetError

func (m *ServiceData) TimesheetError() error

func (*ServiceData) TimesheetStatus

func (m *ServiceData) TimesheetStatus() int

type ServiceUpdateEvent

type ServiceUpdateEvent struct{}

ServiceUpdateEvent represents an event indicating data has been refreshed

Jump to

Keyboard shortcuts

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