app

package
v0.0.0-...-4b72d78 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2020 License: GPL-3.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MetricsPrintOut

func MetricsPrintOut() string

Types

type App

type App struct {
	Cams     []*camera.Cam
	Detector *detect.Detector
	SysErr   *systemerr.LogReader
	PubSub   messaging.MessengerInterface

	FrameInterval time.Duration
	StartupTime   time.Time
	HeartbeatURL  string
	CancelFn      context.CancelFunc
	RoundRobin    int

	AlertUploadChan chan *jobs.UploadJob
	InfoUploadChan  chan *jobs.UploadJob
	SnapshotChan    chan jobs.Cmd
	FrameChan       chan jobs.Cmd
	MsgChan         chan messaging.Msg
}

func New

func New(config Config) (*App, error)

func (*App) BotBroadcastMsg

func (a *App) BotBroadcastMsg(msg string)

func (*App) CancelAndExit

func (a *App) CancelAndExit()

func (*App) ErrorPoller

func (a *App) ErrorPoller(ctx context.Context)

func (*App) GetParams

func (a *App) GetParams() string

func (*App) HandleMessages

func (a *App) HandleMessages(ctx context.Context)

HandleMessages pulls incoming messages from the messenger (pubsub) and handles them.

func (*App) Heartbeat

func (a *App) Heartbeat(ctx context.Context)

func (*App) ListenTelegram

func (a *App) ListenTelegram(ctx context.Context)

func (*App) MessengerListen

func (a *App) MessengerListen(ctx context.Context) error

MessengerListen invokes the messenger pubsub interface to listen for incoming messages

func (*App) NextFrame

func (a *App) NextFrame() error

func (*App) NextFrameFromCam

func (a *App) NextFrameFromCam(index int) error

func (*App) Run

func (a *App) Run(ctx context.Context) error

func (*App) SendHist

func (a *App) SendHist(camIndex int, hist *HistVals) error

func (*App) Supervisor

func (a *App) Supervisor(ctx context.Context)

func (*App) Uploader

func (a *App) Uploader(ctx context.Context) error

type CamMetrics

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

func NewCamMetrics

func NewCamMetrics(name string) *CamMetrics

type Config

type Config struct {
	Cams            []*camera.Cam
	Detector        *detect.Detector
	SysErr          *systemerr.LogReader
	PubSub          messaging.MessengerInterface
	FrameIntervalMS int
	HeartbeatURL    string
	SnapshotChan    chan jobs.Cmd
	FrameChan       chan jobs.Cmd
}

type HistVals

type HistVals struct {
	Title   string
	Buckets int
	Vals    map[int]int64
}

func NewHistVals

func NewHistVals(title string, buckets int) *HistVals

func (*HistVals) Inc

func (h *HistVals) Inc(p int)

func (*HistVals) Len

func (h *HistVals) Len() int

func (*HistVals) XYer

func (h *HistVals) XYer() plotter.XYer

type Label

type Label struct {
	Name       string
	Confidence float64
}

Jump to

Keyboard shortcuts

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