summaryrefslogtreecommitdiffstats
path: root/src/go/collectors/go.d.plugin/modules/pulsar/cache.go
blob: 7f113bf86f62c2d568301490473a0e3a5b4b4aba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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
	}
)