MCPcopy
hub / github.com/docker/docker-agent / Write

Method Write

pkg/concurrent/buffer.go:18–22  ·  view source on GitHub ↗

Write appends p to the buffer.

(p []byte)

Source from the content-addressed store, hash-verified

16
17// Write appends p to the buffer.
18func (b *Buffer) Write(p []byte) (int, error) {
19 b.mu.Lock()
20 defer b.mu.Unlock()
21 return b.buf.Write(p)
22}
23
24// String returns the buffered content.
25func (b *Buffer) String() string {

Callers 15

TestBuffer_WriteFunction · 0.95
TestBuffer_BytesFunction · 0.95
TestBuffer_LenFunction · 0.95
TestBuffer_ResetFunction · 0.95
TestBuffer_DrainFunction · 0.95
TestBuffer_ConcurrentFunction · 0.95
writeJSONFunction · 0.45
writeSSEChunkFunction · 0.45

Calls 2

LockMethod · 0.45
UnlockMethod · 0.45

Tested by 15

TestBuffer_WriteFunction · 0.76
TestBuffer_BytesFunction · 0.76
TestBuffer_LenFunction · 0.76
TestBuffer_ResetFunction · 0.76
TestBuffer_DrainFunction · 0.76
TestBuffer_ConcurrentFunction · 0.76
writeSSEChunkFunction · 0.36