monitor

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2019 License: Apache-2.0 Imports: 3 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Copyright 2017-2018 OneLedger

Copyright 2017-2018 OneLedger

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Monitor

type Monitor struct {
	TickerThreshold int
	RunningMode     RunningMode
	PidFilePath     string
}

func CreateMonitor

func CreateMonitor(tickerThreshold int, runningMode RunningMode, pidPath string) Monitor

func (Monitor) CheckStatus

func (monitor Monitor) CheckStatus(status_ch chan Status)

func (Monitor) CheckUnique

func (monitor Monitor) CheckUnique() (Status, bool)

func (Monitor) GetPidFilePath

func (monitor Monitor) GetPidFilePath() string

type RunningMode

type RunningMode int
const (
	DEFAULT_MODE RunningMode = iota
	AGGRESIVE_MODE
	CONSERVATIVE_MODE
)

type Status

type Status struct {
	Details string
	Code    StatusCode
}

type StatusCode

type StatusCode int

TODO: Conflicts with the protocol's status code

const (
	STATUS_OK StatusCode = iota
	STATUS_WARNING
	STATUS_ERROR
	STATUS_DEADLOOP
	STATUS_PANIC
	STATUS_ALREADY_RUNNING
)

Jump to

Keyboard shortcuts

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