Documentation ¶
Overview ¶
Package status handles functions related to the current state of the network
Index ¶
- func CheckBuildStatus(buildID string) (string, error)
- func FindNodeIndex(status []NodeStatus, name string, serverID int) int
- func GetClient(id int) (*ssh.Client, error)
- func GetClients(servers []int) ([]*ssh.Client, error)
- func GetClientsFromNodes(nodes []db.Node) ([]*ssh.Client, error)
- func GetLatestServers(testnetID string) ([]db.Server, error)
- type Comp
- type NodeStatus
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckBuildStatus ¶
CheckBuildStatus checks the current status of the build relating to the given build id
func FindNodeIndex ¶
func FindNodeIndex(status []NodeStatus, name string, serverID int) int
FindNodeIndex finds the index of a node by name and server id
func GetClient ¶
GetClient retrieves the ssh client for running a command on a remote server based on server id. It will create one if it does not exist.
func GetClients ¶
GetClients functions similar to GetClient, except that it takes in an array of server ids and outputs an array of clients
func GetClientsFromNodes ¶
GetClientsFromNodes gets all of the ssh clients you need for communication with the given nodes
Types ¶
type Comp ¶
type Comp struct { CPU float64 `json:"cpu"` VSZ float64 `json:"virtualMemorySize"` RSS float64 `json:"residentSetSize"` }
Comp represents the compuational resources currently in use by a node
type NodeStatus ¶
type NodeStatus struct { Name string `json:"name"` Server int `json:"server"` IP string `json:"ip"` Up bool `json:"up"` Resources Comp `json:"resourceUse"` ID string `json:"id"` }
NodeStatus represents the status of the node
func CheckNodeStatus ¶
func CheckNodeStatus(nodes []db.Node) ([]NodeStatus, error)
CheckNodeStatus checks the status of the nodes in the current testnet