1
0
mirror of https://github.com/nxshock/zkv.git synced 2024-11-27 11:21:02 +05:00
zkv/options.go

22 lines
417 B
Go

package zkv
import "github.com/klauspost/compress/zstd"
type Options struct {
// Maximum number of concurrent reads
MaxParallelReads uint
// Compression level
CompressionLevel zstd.EncoderLevel
}
func (o *Options) setDefaults() {
if o.MaxParallelReads == 0 {
o.MaxParallelReads = defaultOptions.MaxParallelReads
}
if o.CompressionLevel == 0 {
o.CompressionLevel = defaultOptions.CompressionLevel
}
}