Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Module = fx.Options( fx.Provide(snappy.NewCompressor), fx.Provide(s2.NewCompressor), fx.Provide(zstd.NewCompressor), fx.Provide(none.NewCompressor), fx.Provide(NewMap), )
Module for fx.
Functions ¶
This section is empty.
Types ¶
type Compressor ¶
type Compressor interface { // Compress data. Compress(data []byte) []byte // Decompress data. Decompress(data []byte) ([]byte, error) }
Compressor allows to have different ways to compress/decompress.
type Map ¶
type Map struct {
// contains filtered or unexported fields
}
Map of compressor.
func (*Map) Register ¶
func (f *Map) Register(kind string, c Compressor)
Register kind and compressor.
type MapParams ¶ added in v1.420.0
type MapParams struct { fx.In Zstd *zstd.Compressor S2 *s2.Compressor Snappy *snappy.Compressor None *none.Compressor }
MapParams for compressor.
Click to show internal directories.
Click to hide internal directories.