MCPcopy Index your code
hub / github.com/docker/docker-agent / Reset

Method Reset

pkg/concurrent/buffer.go:47–51  ·  view source on GitHub ↗

Reset clears the buffer.

()

Source from the content-addressed store, hash-verified

45
46// Reset clears the buffer.
47func (b *Buffer) Reset() {
48 b.mu.Lock()
49 defer b.mu.Unlock()
50 b.buf.Reset()
51}
52
53// Drain returns the buffered content and resets the buffer atomically.
54func (b *Buffer) Drain() string {

Callers 4

TestBuffer_ResetFunction · 0.95
TestModel_LogsSelectionFunction · 0.95
TestSandboxAllowDenyListFunction · 0.95

Calls 3

ResetMethod · 0.65
LockMethod · 0.45
UnlockMethod · 0.45

Tested by 4

TestBuffer_ResetFunction · 0.76
TestModel_LogsSelectionFunction · 0.76
TestSandboxAllowDenyListFunction · 0.76