From 4195786242224e52334ce45f2986a7e7594e8b65 Mon Sep 17 00:00:00 2001 From: Thomas Roehl Date: Mon, 31 Jan 2022 06:04:30 +0100 Subject: [PATCH] Add all CCMetric functions to interface --- internal/ccMetric/ccMetric.go | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/internal/ccMetric/ccMetric.go b/internal/ccMetric/ccMetric.go index 05f81ff..b0850ed 100644 --- a/internal/ccMetric/ccMetric.go +++ b/internal/ccMetric/ccMetric.go @@ -22,14 +22,27 @@ type ccMetric struct { type CCMetric interface { lp.MutableMetric - AddMeta(key, value string) - MetaList() []*lp.Tag - RemoveTag(key string) + Name() string + AddTag(key, value string) GetTag(key string) (string, bool) + HasTag(key string) bool + RemoveTag(key string) + Tags() map[string]string + TagList() []*lp.Tag + AddMeta(key, value string) GetMeta(key string) (string, bool) + HasMeta(key string) bool + RemoveMeta(key string) + Meta() map[string]string + MetaList() []*lp.Tag + AddField(key string, value interface{}) GetField(key string) (interface{}, bool) HasField(key string) bool RemoveField(key string) + Fields() map[string]interface{} + FieldList() []*lp.Field + String() string + SetTime(t time.Time) } func (m *ccMetric) Meta() map[string]string {