Documentation
¶
Overview ¶
Package sites contains types, functions and methods for reading and interpreting data about sites contained in data files sites.json and machines.json
This data can be accessed through the global variable "Data".
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Machine ¶
type Machine struct {
// Name is the name of the machine.
Name string
// Site is the site the machine is located at.
Site string
}
Machine represents a physical machine located in a site.
type Site ¶
type Site struct {
// Name is the name of the site.
Name string
// Type is the type of site.
Type string
// Status is the status of the site.
Status string
// Machines are a list of machines in the site.
Machines []Machine
}
Site represents an individual site where we have machines located.
type SiteData ¶
type SiteData struct {
// Sites is mapping of all sites by name.
Sites map[string]Site
// Machines is a mapping of all machines by their full name (aa01.aaa).
Machines map[string]Machine
}
SiteData contains information on our sites and the machines that are located in those sites.
var Data SiteData
Data holds the site data and is how to access the data. Note: in a real system, the data here would always be a copy. That way different things accessing it could not change it for others.
Click to show internal directories.
Click to hide internal directories.