procwatch

package
v0.0.0-...-79dd3f0 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2018 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cfg

type Cfg struct {
	A3exe        string
	A3par        []string
	Schedule     Schedule
	UseScheduler bool
	UseWatcher   bool
}

Cfg contains all data required by Procwatch

func (Cfg) GetConfig

func (c Cfg) GetConfig() Cfg

GetConfig returns the Cfg Object

type Config

type Config interface {
	GetConfig() Cfg
}

Config is the Interface providing Configs for the Procwatch

type Schedule

type Schedule struct {
	Schedule []SchedulerEntity `json:"schedule"`
}

Schedule Object

type SchedulePath

type SchedulePath string

SchedulePath to config

func (SchedulePath) Parse

func (sc SchedulePath) Parse() (*Schedule, error)

Parse json from path and return Schedule

type SchedulerEntity

type SchedulerEntity struct {
	Command string `json:"command"`
	Restart bool   `json:"restart"`
	Day     string `json:"day"`
	Hour    string `json:"hour"`
	Minute  string `json:"minute"`
}

SchedulerEntity all data required by Procwatch

type Watcher

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

Watcher is the the Object Handling the Procwatch

func New

func New(w Config) *Watcher

New creates a Procwatch with given Config

func (*Watcher) GetCmdChannel

func (w *Watcher) GetCmdChannel() chan string

GetCmdChannel returns the channel to which scheduler and watcher write their commands

func (*Watcher) GetOutput

func (w *Watcher) GetOutput() (stderr, stdout io.ReadCloser)

GetOutput returns the Stderr and Stdout Readers

func (*Watcher) Start

func (w *Watcher) Start()

Start the Server

Jump to

Keyboard shortcuts

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