node

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: May 29, 2019 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// NotObserved is the default status, used when a reboot command has just
	// been issued.
	NotObserved = NodeStatus(0)

	// ObservedOnline means the machine was seen online during the last run.
	ObservedOnline = NodeStatus(1)

	// ObservedOffline means the machine is still seen as offline after a
	// reboot command.
	ObservedOffline = NodeStatus(2)
)

Variables

This section is empty.

Functions

This section is empty.

Types

type History

type History struct {
	Node
	LastReboot time.Time
	Status     NodeStatus
}

History holds the last reboot of a Node and the status.

Status is always NotObserved initially, and should be updated to ObservedOnline or ObservedOffline as soon as the information is available.

func NewHistory

func NewHistory(name string, site string, lastReboot time.Time) History

NewHistory returns a new NodeHistory, defaulting Status to "NotObserved".

type Node

type Node struct {
	Name string
	Site string
}

Node represents a machine on M-Lab's infrastructure

func New

func New(name string, site string) Node

New returns a new Node

type NodeStatus

type NodeStatus uint8

NodeStatus is an alias for uint8, used for readability.

Jump to

Keyboard shortcuts

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