mirror of
https://github.com/ClusterCockpit/cc-metric-collector.git
synced 2024-11-10 04:27:25 +01:00
Add and export SetName() function for CCMetric
This commit is contained in:
parent
8319d3de43
commit
64a12b80bb
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user