mirror of
https://github.com/lukaszraczylo/graphql-monitoring-proxy.git
synced 2026-06-05 23:03:48 +00:00
cedee416a8
* General improvements and bug fixes. * Improve tests coverage. * fixup! Improve tests coverage. * Update README.md with latest changes. * Fix the uint32 * Resolve issue with race condition for logging. * fixup! Merge remote-tracking branch 'origin/main' into improvements-mid-apr-2025 * Fix the test of the rate limiter * Add default ratelimit.json file * Update dependencies. * Significant refactor. * fixup! Significant refactor. * fixup! Merge remote-tracking branch 'origin/main' into improvements-mid-apr-2025 * fixup! fixup! Merge remote-tracking branch 'origin/main' into improvements-mid-apr-2025 * fixup! fixup! fixup! Merge remote-tracking branch 'origin/main' into improvements-mid-apr-2025 * fixup! fixup! fixup! fixup! fixup! Merge remote-tracking branch 'origin/main' into improvements-mid-apr-2025 * fixup! fixup! fixup! fixup! fixup! fixup! Merge remote-tracking branch 'origin/main' into improvements-mid-apr-2025 * fixup! fixup! fixup! fixup! fixup! fixup! fixup! Merge remote-tracking branch 'origin/main' into improvements-mid-apr-2025 * fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! Merge remote-tracking branch 'origin/main' into improvements-mid-apr-2025 * fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! Merge remote-tracking branch 'origin/main' into improvements-mid-apr-2025 * fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! Merge remote-tracking branch 'origin/main' into improvements-mid-apr-2025
42 lines
964 B
Go
42 lines
964 B
Go
package main
|
|
|
|
import (
|
|
"bytes"
|
|
"compress/gzip"
|
|
"io"
|
|
|
|
"github.com/lukaszraczylo/graphql-monitoring-proxy/pkg/pools"
|
|
)
|
|
|
|
// Legacy compatibility layer - delegates to unified pool implementation
|
|
|
|
// GetHTTPBuffer gets a buffer from the global pool
|
|
func GetHTTPBuffer() *bytes.Buffer {
|
|
return pools.GetBuffer()
|
|
}
|
|
|
|
// PutHTTPBuffer returns a buffer to the global pool
|
|
func PutHTTPBuffer(buf *bytes.Buffer) {
|
|
pools.PutBuffer(buf)
|
|
}
|
|
|
|
// GetGzipWriter gets a gzip writer from the global pool
|
|
func GetGzipWriter(w io.Writer) *gzip.Writer {
|
|
return pools.GetGzipWriter(w)
|
|
}
|
|
|
|
// PutGzipWriter returns a gzip writer to the global pool
|
|
func PutGzipWriter(gz *gzip.Writer) {
|
|
pools.PutGzipWriter(gz)
|
|
}
|
|
|
|
// GetGzipReader gets a gzip reader from the global pool
|
|
func GetGzipReader(r io.Reader) (*gzip.Reader, error) {
|
|
return pools.GetGzipReader(r)
|
|
}
|
|
|
|
// PutGzipReader returns a gzip reader to the global pool
|
|
func PutGzipReader(gr *gzip.Reader) {
|
|
pools.PutGzipReader(gr)
|
|
}
|