Documentation
¶
Overview ¶
Package metrics defines the instrumentation metrics for this program.
Index ¶
- type Client
- func (m *Client) CreateMetricsClientFunc() (metrics.Client, error)
- func (m *Client) SetDiskFree(v uint64)
- func (m *Client) SetDiskTotal(v uint64)
- func (m *Client) SetLoad1(v float64)
- func (m *Client) SetLoad15(v float64)
- func (m *Client) SetLoad5(v float64)
- func (m *Client) SetMemoryFree(v uint64)
- func (m *Client) SetMemoryTotal(v uint64)
- func (m *Client) SetNetwork(nic string, rx uint64, tx uint64)
- func (m *Client) SetTempCPU(v float64)
- func (m *Client) SetUptime(v time.Duration)
- type Metrics
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client groups the custom collectors to be shared with other packages.
func (*Client) CreateMetricsClientFunc ¶
CreateMetricsClientFunc returns the metrics Client.
func (*Client) SetDiskFree ¶
SetDiskFree sets the total free disk space in bytes.
func (*Client) SetDiskTotal ¶
SetDiskTotal sets the total disk size in bytes.
func (*Client) SetMemoryFree ¶
SetMemoryFree sets the total free memory in bytes.
func (*Client) SetMemoryTotal ¶
SetMemoryTotal sets the total available memory in bytes.
func (*Client) SetNetwork ¶
SetNetwork sets the network received and transmitted bytes for the specified NIC.
func (*Client) SetTempCPU ¶
SetTempCPU sets the CPU Temperature in Celsius Degrees.
type Metrics ¶
type Metrics interface { CreateMetricsClientFunc() (metrics.Client, error) SetUptime(v time.Duration) SetMemoryTotal(v uint64) SetMemoryFree(v uint64) SetLoad1(v float64) SetLoad5(v float64) SetLoad15(v float64) SetTempCPU(v float64) SetDiskTotal(v uint64) SetDiskFree(v uint64) SetNetwork(nic string, rx uint64, tx uint64) }
Metrics is the interface for the custom metrics.
Click to show internal directories.
Click to hide internal directories.