Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ExtServiceResp ¶ added in v0.2.0
type ExtServiceResp struct {
Name string `json:"name"`
StatusCode int `json:"status_code"`
ResponseTime int64 `json:"response_time"` // milliseconds
Body map[string]interface{} `json:"body"`
}
ExtServiceResp contains extended service information
type ExtServices ¶ added in v0.2.0
type ExtServices struct {
// contains filtered or unexported fields
}
ExtServices is a service that retrieves data from external services via HTTP GET calls
func NewExtServices ¶ added in v0.2.0
func NewExtServices(httpTimeout time.Duration, concurrency int, ss ...string) *ExtServices
NewExtServices returns a new instance of ExtServices for a list of name:url pairs
func (*ExtServices) Status ¶ added in v0.2.0
func (es *ExtServices) Status() []ExtServiceResp
Status returns extended service information, request timeout is 5 seconds and runs concurrently
type Info ¶
type Info struct {
HostName string `json:"hostname"`
Procs int `json:"procs"`
HostID string `json:"host_id"`
CPUPercent int `json:"cpu_percent"`
MemPercent int `json:"mem_percent"`
Uptime uint64 `json:"uptime"`
Volumes map[string]Volume `json:"volumes,omitempty"`
Loads struct {
One float64 `json:"one"`
Five float64 `json:"five"`
Fifteen float64 `json:"fifteen"`
} `json:"load_average"`
ExtServices map[string]ExtServiceResp `json:"ext_services,omitempty"`
}
Info contains disk and cpu utilization results
type Service ¶
type Service struct {
Volumes []Volume
ExtServices *ExtServices
}
Service provides disk and cpu utilization
Click to show internal directories.
Click to hide internal directories.