mirror of
https://github.com/ClusterCockpit/cc-metric-collector.git
synced 2025-07-19 03:11:41 +02:00
Add and export SetName() function for CCMetric
This commit is contained in:
@@ -25,6 +25,7 @@ type ccMetric struct {
|
||||
type CCMetric interface {
|
||||
lp.Metric // Time(), Name(), TagList(), FieldList()
|
||||
|
||||
SetName(name string)
|
||||
SetTime(t time.Time)
|
||||
|
||||
Meta() map[string]string // Map of meta data tags
|
||||
@@ -68,6 +69,10 @@ func (m *ccMetric) Name() string {
|
||||
return m.name
|
||||
}
|
||||
|
||||
func (m *ccMetric) SetName(name string) {
|
||||
m.name = name
|
||||
}
|
||||
|
||||
// Tags returns the the list of tags as key-value-mapping
|
||||
func (m *ccMetric) Tags() map[string]string {
|
||||
return m.tags
|
||||
|
Reference in New Issue
Block a user