monitor

package
v0.14.1 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

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