data

package
v0.0.0-...-7107463 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StatusUp    = "UP"
	StatusDown  = "DOWN"
	StatusStart = "START"
)

Variables

View Source
var (
	OutputCadence = 30 * time.Second
)

Functions

func InputState

func InputState(file string) error

func MonitorUptime

func MonitorUptime(host string)

func OutputState

func OutputState(ctx context.Context, file string) error

Types

type Status

type Status struct {
	Start time.Time
	End   time.Time
	State string
}

func GetState

func GetState() []*Status

func (*Status) Duration

func (s *Status) Duration() time.Duration

func (*Status) IsActive

func (s *Status) IsActive() bool

func (*Status) RelativeEnd

func (s *Status) RelativeEnd() string

func (*Status) String

func (s *Status) String() string

func (*Status) TimeRange

func (s *Status) TimeRange() string

Jump to

Keyboard shortcuts

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