From 64a12b80bb1e860c12835a6925319c300f8b251a Mon Sep 17 00:00:00 2001 From: Thomas Roehl Date: Tue, 1 Feb 2022 18:27:16 +0100 Subject: [PATCH] Add and export SetName() function for CCMetric --- internal/ccMetric/ccMetric.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/internal/ccMetric/ccMetric.go b/internal/ccMetric/ccMetric.go index 20b9786..9745e9d 100644 --- a/internal/ccMetric/ccMetric.go +++ b/internal/ccMetric/ccMetric.go @@ -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