Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertToString ¶
func ConvertToString(result []*MetricResult) string
ConvertToString converts MetricResults into string
Types ¶
type CollectorFnWrapper ¶
type CollectorFnWrapper struct { RunFn CollectorRunner PrecheckFn CollectorPrecheck Dependencies []string Type string }
CollectorFnWrapper is wrapper struct for inventory collectors
type CollectorPrecheck ¶
type CollectorPrecheck func() error
CollectorPrecheck is precheck function for metric or inventory collectors
type CollectorRunner ¶
CollectorRunner returns inventory by calling run function of invetory collector
type MetricFnWrapper ¶
type MetricFnWrapper struct { RunFn MetricRunner PrecheckFn CollectorPrecheck Dependencies []string Type string }
MetricFnWrapper is wrapper struct for metric collectors
type MetricResult ¶
MetricResult represents a metric (example cpu)
func BuildMetricResult ¶
func BuildMetricResult(header, metric, sufix string, metadata map[string]string) *MetricResult
BuildMetricResult returns MetricResult from given header, metric etc
type MetricRunner ¶
type MetricRunner func() ([]*MetricResult, error)
MetricRunner returns metric by calling run function of metric collector
Click to show internal directories.
Click to hide internal directories.