MCPcopy Index your code
hub / github.com/docker/cli / add

Method add

cli/command/container/stats_helpers.go:25–33  ·  view source on GitHub ↗
(cs *Stats)

Source from the content-addressed store, hash-verified

23var daemonOSType string
24
25func (s *stats) add(cs *Stats) bool {
26 s.mu.Lock()
27 defer s.mu.Unlock()
28 if _, exists := s.isKnownContainer(cs.Container); !exists {
29 s.cs = append(s.cs, cs)
30 return true
31 }
32 return false
33}
34
35func (s *stats) remove(id string) {
36 s.mu.Lock()

Callers 1

RunStatsFunction · 0.95

Calls 1

isKnownContainerMethod · 0.95

Tested by

no test coverage detected