master
go 19 lines 354 Bytes
Raw
1 // SPDX-License-Identifier: GPL-3.0-or-later
2
3 package pulsar
4
5 func newCache() *cache {
6 return &cache{
7 namespaces: make(map[namespace]bool),
8 topics: make(map[topic]bool),
9 }
10 }
11
12 type (
13 namespace struct{ name string }
14 topic struct{ namespace, name string }
15 cache struct {
16 namespaces map[namespace]bool
17 topics map[topic]bool
18 }
19 )