manage

package
v1.20.0 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2021 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ConfigFilename = "manage.yaml"
)

Config Constants

Functions

This section is empty.

Types

type Config

type Config struct {
	Data     string `yaml:"data,omitempty"`
	Monitors []mon  `yaml:"monitors"`
}

Config contains the parameters for Manage

func NewConfig

func NewConfig(configPath string) *Config

NewConfig creates a new Config

type Manage

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

Manage contains all the monitors and manages them

func NewManage

func NewManage() *Manage

NewManage creates a new Manage

func (*Manage) AddMonitor

func (m *Manage) AddMonitor(mon *monitor.Monitor)

AddMonitor adds a new monitor to manage

func (*Manage) GetDataDirectory

func (m *Manage) GetDataDirectory() string

GetDataDirectory returns the save data directory

func (*Manage) GetMonitorAlertTimes

func (m *Manage) GetMonitorAlertTimes() (result map[string]monitor.AlertTimes)

GetMonitorAlertTimes returns all monitor alert times

func (*Manage) GetMonitorNames

func (m *Manage) GetMonitorNames() (result []string)

GetMonitorNames returns a list of monitor names

func (*Manage) GetMonitorVideoStats

func (m *Manage) GetMonitorVideoStats(monitorName string) (readerIn *videosource.VideoStats, readerOut *videosource.VideoStats)

GetMonitorVideoStats returns the monitor's video stats

func (*Manage) RemoveMonitor

func (m *Manage) RemoveMonitor(mon *monitor.Monitor)

RemoveMonitor will stop, wait, and remove from manage

func (*Manage) Start

func (m *Manage) Start()

Start runs the processes

func (*Manage) Stop

func (m *Manage) Stop()

Stop the manage

func (*Manage) Subscribe

func (m *Manage) Subscribe(monitorName string, key string) <-chan videosource.ProcessedImage

Subscribe to a monitor's video images

func (*Manage) Unsubscribe

func (m *Manage) Unsubscribe(monitorName string, key string)

Unsubscribe to a monitor's video images

func (*Manage) Wait

func (m *Manage) Wait()

Wait until done

Jump to

Keyboard shortcuts

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