Documentation
¶
Index ¶
- type Bundle
- type BundleCreate
- type BundleCreateResponseJSONStruct
- type BundleGenericResponseJSONStruct
- type BundleReportStatus
- type Client
- func (c *Client) Cancel() (*BundleGenericResponseJSONStruct, error)
- func (c *Client) Create(nodes []string) (*BundleCreateResponseJSONStruct, error)
- func (c *Client) Delete(bundle string) (*BundleGenericResponseJSONStruct, error)
- func (c *Client) Get(bundle string) (*http.Response, error)
- func (c *Client) List() (map[string][]Bundle, error)
- func (c *Client) Status() (map[string]BundleReportStatus, error)
- func (c *Client) Units(node string) (*UnitsHealthResponseJSONStruct, error)
- type HealthResponseValues
- type UnitsHealthResponseJSONStruct
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BundleCreate ¶
type BundleCreate struct {
Nodes []string `json:"nodes"`
}
BundleCreate is the json request used to create a diagnostics bundle.
type BundleCreateResponseJSONStruct ¶
type BundleCreateResponseJSONStruct struct {
Status string `json:"status"`
Extra struct {
BundleName string `json:"bundle_name"`
}
}
BundleCreateResponseJSONStruct is the response from /system/health/v1/report/diagnostics/create.
type BundleGenericResponseJSONStruct ¶
type BundleGenericResponseJSONStruct struct {
Status string `json:"status"`
}
BundleGenericResponseJSONStruct is the generic response from /system/health/v1/report/diagnostics endppoints.
type BundleReportStatus ¶
type BundleReportStatus struct {
// job related fields
Running bool `json:"is_running"`
Status string `json:"status"`
Errors []string `json:"errors"`
LastBundlePath string `json:"last_bundle_dir"`
JobStarted string `json:"job_started"`
JobEnded string `json:"job_ended"`
JobDuration string `json:"job_duration"`
JobProgressPercentage float32 `json:"job_progress_percentage"`
// config related fields
DiagnosticBundlesBaseDir string `json:"diagnostics_bundle_dir"`
DiagnosticsJobTimeoutMin int `json:"diagnostics_job_timeout_min"`
DiagnosticsUnitsLogsSinceHours string `json:"journald_logs_since_hours"`
DiagnosticsJobGetSingleURLTimeoutMinutes int `json:"diagnostics_job_get_since_url_timeout_min"`
CommandExecTimeoutSec int `json:"command_exec_timeout_sec"`
// metrics related
DiskUsedPercent float64 `json:"diagnostics_partition_disk_usage_percent"`
}
BundleReportStatus is the response from /system/health/v1/report/diagnostics/status/all.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a diagnostics client for DC/OS.
func NewClient ¶
func NewClient(baseClient *httpclient.Client) *Client
NewClient creates a new diagnostics client.
func (*Client) Cancel ¶
func (c *Client) Cancel() (*BundleGenericResponseJSONStruct, error)
Cancel cancel a running job creating a bundle.
func (*Client) Create ¶
func (c *Client) Create(nodes []string) (*BundleCreateResponseJSONStruct, error)
Create requests a bundle creation for given nodes on the cluster.
func (*Client) Delete ¶
func (c *Client) Delete(bundle string) (*BundleGenericResponseJSONStruct, error)
Delete deletes a diagnostics bundle in the cluster.
type HealthResponseValues ¶
type HealthResponseValues struct {
UnitID string `json:"id"`
UnitHealth int `json:"health"`
UnitOutput string `json:"output"`
UnitTitle string `json:"description"`
Help string `json:"help"`
PrettyName string `json:"name"`
}
HealthResponseValues is the response from
type UnitsHealthResponseJSONStruct ¶
type UnitsHealthResponseJSONStruct struct {
Array []HealthResponseValues `json:"units"`
Hostname string `json:"hostname"`
IPAddress string `json:"ip"`
DcosVersion string `json:"dcos_version"`
Role string `json:"node_role"`
MesosID string `json:"mesos_id"`
TdtVersion string `json:"dcos_diagnostics_version"`
}
UnitsHealthResponseJSONStruct is the response from /system/health/v1.