Add metric type to metric struct.
This commit is contained in:
@@ -8,15 +8,18 @@ type Metric struct {
|
||||
Description string
|
||||
// Additional parameters, data inside "{}".
|
||||
Params []string
|
||||
// Type is a metric type.
|
||||
Type string
|
||||
// Metric value.
|
||||
Value string
|
||||
}
|
||||
|
||||
// NewMetric creates new structure for storing single metric data.
|
||||
func NewMetric(name, description string, params []string) Metric {
|
||||
func NewMetric(name, mType, description string, params []string) Metric {
|
||||
m := Metric{
|
||||
Name: name,
|
||||
Description: description,
|
||||
Type: mType,
|
||||
Params: params,
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user