MCPcopy Index your code
hub / github.com/coder/coder / NewHeadTailBuffer

Function NewHeadTailBuffer

agent/agentproc/headtail.go:56–63  ·  view source on GitHub ↗

NewHeadTailBuffer creates a new HeadTailBuffer with the default head and tail sizes.

()

Source from the content-addressed store, hash-verified

54// NewHeadTailBuffer creates a new HeadTailBuffer with the
55// default head and tail sizes.
56func NewHeadTailBuffer() *HeadTailBuffer {
57 b := &HeadTailBuffer{
58 maxHead: MaxHeadBytes,
59 maxTail: MaxTailBytes,
60 }
61 b.cond = sync.NewCond(&b.mu)
62 return b
63}
64
65// NewHeadTailBufferSized creates a HeadTailBuffer with custom
66// head and tail sizes. This is useful for testing truncation

Calls

no outgoing calls