MCPcopy
hub / github.com/microsoft/retina / GetAllNamespaces

Method GetAllNamespaces

pkg/controllers/cache/cache.go:171–185  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

169}
170
171func (c *Cache) GetAllNamespaces() []string {
172 c.RLock()
173 defer c.RUnlock()
174
175 unique := make(map[string]struct{})
176 for _, ep := range c.epMap {
177 unique[ep.Namespace()] = struct{}{}
178 }
179
180 namespaces := make([]string, 0, len(unique))
181 for ns := range unique {
182 namespaces = append(namespaces, ns)
183 }
184 return namespaces
185}
186
187func (c *Cache) GetIPsByNamespace(ns string) []net.IP {
188 c.RLock()

Callers

nothing calls this directly

Calls 1

NamespaceMethod · 0.80

Tested by

no test coverage detected