Documentation
¶
Overview ¶
Package agentlocal provides facilities for accessing local pmm-agent API.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotSetUp = fmt.Errorf("pmm-agent is running, but not set up")
ErrNotSetUp is returned by GetStatus when pmm-agent is running, but not set up.
Functions ¶
func SetTransport ¶
SetTransport configures transport for accessing local pmm-agent API.
Types ¶
type AgentStatus ¶
type NetworkInfo ¶
type NetworkInfo bool
const ( RequestNetworkInfo NetworkInfo = true DoNotRequestNetworkInfo NetworkInfo = false )
type Status ¶
type Status struct { AgentID string `json:"agent_id"` NodeID string `json:"node_id"` ServerURL *url.URL `json:"server_url"` ServerInsecureTLS bool `json:"server_insecure_tls"` ServerVersion string `json:"server_version"` Agents []AgentStatus `json:"agents"` Connected bool ServerClockDrift time.Duration ServerLatency time.Duration }
Status represents pmm-agent status.
func GetStatus ¶
func GetStatus(requestNetworkInfo NetworkInfo) (*Status, error)
GetStatus returns local pmm-agent status. As a special case, if pmm-agent is running, but not set up, ErrNotSetUp is returned.
Click to show internal directories.
Click to hide internal directories.