Documentation
¶
Overview ¶
Package localstatus is the small channel between a running hub and the tools on the same machine (the console and `regulus status`): a Unix socket in the data directory, readable only by the user that runs the hub. It carries no login; the file permissions are the proof of who may ask.
Index ¶
Constants ¶
View Source
const SocketName = "regulus.sock"
SocketName is the file name of the socket inside the data directory.
Variables ¶
This section is empty.
Functions ¶
func SocketPath ¶
SocketPath is where the hub of dataDir listens for local tools.
Types ¶
type Agent ¶
type Agent struct {
ID string `json:"id"`
Hostname string `json:"hostname,omitempty"`
Version string `json:"version,omitempty"`
Status string `json:"status"`
LastHeartbeat time.Time `json:"last_heartbeat,omitzero"`
}
Agent is a connected agent.
type Status ¶
type Status struct {
Version string `json:"version"`
StartedAt time.Time `json:"started_at"`
// Addr is where the dashboard is bound; AgentAddr where remote agents
// connect, or "" while that is off.
Addr string `json:"addr"`
AgentAddr string `json:"agent_addr,omitempty"`
BuiltinAgent bool `json:"builtin_agent"`
// SetupToken is the one-time token to create the first admin; it is
// empty once the admin exists.
SetupToken string `json:"setup_token,omitempty"`
Agents []Agent `json:"agents"`
}
Status is what a running hub reports about itself.
Click to show internal directories.
Click to hide internal directories.