summaryrefslogtreecommitdiffstats
path: root/src/go/collectors/go.d.plugin/modules/pulsar/cache.go
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/go/collectors/go.d.plugin/modules/pulsar/cache.go19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/go/collectors/go.d.plugin/modules/pulsar/cache.go b/src/go/collectors/go.d.plugin/modules/pulsar/cache.go
new file mode 100644
index 000000000..7f113bf86
--- /dev/null
+++ b/src/go/collectors/go.d.plugin/modules/pulsar/cache.go
@@ -0,0 +1,19 @@
+// SPDX-License-Identifier: GPL-3.0-or-later
+
+package pulsar
+
+func newCache() *cache {
+ return &cache{
+ namespaces: make(map[namespace]bool),
+ topics: make(map[topic]bool),
+ }
+}
+
+type (
+ namespace struct{ name string }
+ topic struct{ namespace, name string }
+ cache struct {
+ namespaces map[namespace]bool
+ topics map[topic]bool
+ }
+)