mirror of
https://github.com/ClusterCockpit/cc-metric-collector.git
synced 2024-12-26 07:29:04 +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