MCPcopy
hub / github.com/netdata/netdata / addEmpty

Method addEmpty

src/go/plugin/framework/confgroup/cache.go:29–46  ·  view source on GitHub ↗
(group *Group)

Source from the content-addressed store, hash-verified

27}
28
29func (c *Cache) addEmpty(group *Group) (added, removed []Config) {
30 set, ok := c.sources[group.Source]
31 if !ok {
32 return nil, nil
33 }
34
35 for hash, cfg := range set {
36 c.hashes[hash]--
37 if c.hashes[hash] == 0 {
38 removed = append(removed, cfg)
39 }
40 delete(set, hash)
41 }
42
43 delete(c.sources, group.Source)
44
45 return nil, removed
46}
47
48func (c *Cache) addNotEmpty(group *Group) (added, removed []Config) {
49 set, ok := c.sources[group.Source]

Callers 1

AddMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected