VictoriaMetrics/app/victoria-metrics/test/prom_writter.go

14 lines
226 B
Go
Raw Normal View History

// +build integration
package test
import "github.com/golang/snappy"
func Compress(wr WriteRequest) ([]byte, error) {
data, err := wr.Marshal()
if err != nil {
return nil, err
}
return snappy.Encode(nil, data), nil
}