monitor

package
v0.0.0-...-35d3f71 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2023 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Logger   *log.Logger
	Decks    *decks.Decks
	Filepath string
}

Config contains configuration and data needed to run the monitor.

type Monitor

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

Monitor monitors the given file for changes, and updates the status of the decks.

func New

func New(cfg Config) (*Monitor, error)

New returns an initialised Monitor ready to watch the session file for changes.

func (*Monitor) Close

func (m *Monitor) Close()

Close closes the file watcher when it's finished being used.

func (*Monitor) Run

func (m *Monitor) Run(ch chan error)

Run begins monitoring the session file for changes, and notifies the decks when changes occur.

Jump to

Keyboard shortcuts

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