Add and export SetName() function for CCMetric

This commit is contained in:
Thomas Roehl 2022-02-01 18:27:16 +01:00
parent 8319d3de43
commit 64a12b80bb

View File

@ -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