Skip to main content
Glama

mcp-victoriametrics

bytebuffer.go1.16 kB
package quicktemplate import ( "github.com/valyala/bytebufferpool" ) // ByteBuffer implements io.Writer on top of byte slice. // // Recycle byte buffers via AcquireByteBuffer and ReleaseByteBuffer // in order to reduce memory allocations. // // Deprecated: use github.com/valyala/bytebufferpool instead. type ByteBuffer bytebufferpool.ByteBuffer // Write implements io.Writer. func (b *ByteBuffer) Write(p []byte) (int, error) { return bb(b).Write(p) } // Reset resets the byte buffer. func (b *ByteBuffer) Reset() { bb(b).Reset() } // AcquireByteBuffer returns new ByteBuffer from the pool. // // Return unneeded buffers to the pool by calling ReleaseByteBuffer // in order to reduce memory allocations. func AcquireByteBuffer() *ByteBuffer { return (*ByteBuffer)(byteBufferPool.Get()) } // ReleaseByteBuffer retruns byte buffer to the pool. // // Do not access byte buffer after returning it to the pool, // otherwise data races may occur. func ReleaseByteBuffer(b *ByteBuffer) { byteBufferPool.Put(bb(b)) } func bb(b *ByteBuffer) *bytebufferpool.ByteBuffer { return (*bytebufferpool.ByteBuffer)(b) } var byteBufferPool bytebufferpool.Pool

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/VictoriaMetrics-Community/mcp-victoriametrics'

If you have feedback or need assistance with the MCP directory API, please join our Discord server