Documentation ¶
Overview ¶
Package hosts is responsible for holding the state of which hosts the goquery shell is currently connected to. The state should only be mutated via the .connect or .switch commands, but can be looked up anywhere.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddQueryToHost ¶
func Disconnect ¶
Disconnect is responsible for removing a host from the list Can be called with a specific host uuid or an empty "" to denote the current host the cursor is on
func Register ¶
Register is responsible for adding a host to the list of established connected hosts in the host list. Also update the cursor of the current connected host. If a given host is already in the list, return the index
func SetCurrentHost ¶
SetCurrentHost updates the current index used to fetch the uuid of GetCurrentHost's call, returns the uuid
func SetCurrentHostDirectory ¶
func SetHostTables ¶
Types ¶
type Host ¶
type Host struct { UUID string ComputerName string Platform string Version string QueryHistory []Query CurrentDirectory string Username string Tables []string }
func GetCurrentHost ¶
GetCurrentHost is a public API that returns a point to the current host structure.
func GetCurrentHosts ¶
func GetCurrentHosts() []Host
GetCurrentHosts is a public API that returns a the current state of the connectedHosts array