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

Method Bytes

pkg/concurrent/buffer.go:33–37  ·  view source on GitHub ↗

Bytes returns a copy of the buffered content as a byte slice. The returned slice is safe to retain and modify.

()

Source from the content-addressed store, hash-verified

31// Bytes returns a copy of the buffered content as a byte slice.
32// The returned slice is safe to retain and modify.
33func (b *Buffer) Bytes() []byte {
34 b.mu.Lock()
35 defer b.mu.Unlock()
36 return slices.Clone(b.buf.Bytes())
37}
38
39// Len returns the number of bytes currently buffered.
40func (b *Buffer) Len() int {

Callers 15

createTestPNGFunction · 0.95
createTestJPEGFunction · 0.95
encodeJPEGBytesFunction · 0.95
encodePNGBytesFunction · 0.95
encodePNGFunction · 0.95
encodeJPEGFunction · 0.95
createTestPNGFunction · 0.95
createTestJPEGFunction · 0.95
inlineImageFromBase64Function · 0.95
testPNGBase64Function · 0.95
TestBuffer_BytesFunction · 0.95

Calls 3

LockMethod · 0.45
UnlockMethod · 0.45
CloneMethod · 0.45

Tested by 15

createTestPNGFunction · 0.76
createTestJPEGFunction · 0.76
encodeJPEGBytesFunction · 0.76
encodePNGBytesFunction · 0.76
createTestPNGFunction · 0.76
createTestJPEGFunction · 0.76
testPNGBase64Function · 0.76
TestBuffer_BytesFunction · 0.76
TestBuffer_ConcurrentFunction · 0.76
TestExtractZipFunction · 0.76
TestExtractZip_TooLargeFunction · 0.76