Documentation ¶
Index ¶
- func DeregisterCompressor(name CompressorType)
- func DeregisterSerializer(name SerializerType)
- func RegisterCompressor(name CompressorType, compressor Compressor)
- func RegisterSerializer(name SerializerType, serializer Serializer)
- type Compressor
- type CompressorType
- type Serializer
- type SerializerType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeregisterCompressor ¶
func DeregisterCompressor(name CompressorType)
func DeregisterSerializer ¶
func DeregisterSerializer(name SerializerType)
func RegisterCompressor ¶
func RegisterCompressor(name CompressorType, compressor Compressor)
func RegisterSerializer ¶
func RegisterSerializer(name SerializerType, serializer Serializer)
Types ¶
type Compressor ¶
func GetCompressor ¶
func GetCompressor(name CompressorType) Compressor
type CompressorType ¶
type CompressorType string
const GzipCompressorType CompressorType = "gzip"
const LzwCompressorType CompressorType = "lzw"
const NoopCompressorType CompressorType = "noop"
type Serializer ¶
type Serializer interface { Serialize(interface{}) ([]byte, error) Deserialize([]byte, interface{}) error }
func GetSerializer ¶
func GetSerializer(name SerializerType) Serializer
type SerializerType ¶
type SerializerType string
const JSONSerializerType SerializerType = "json"
const JsoniterSerializerType SerializerType = "jsoniter"
const JsonpbSerializerType SerializerType = "jsonpb"
const NoopSerializerType SerializerType = "noop"
const ProtobufSerializerType SerializerType = "protobuf"
const XMLSerializerType SerializerType = "xml"
Click to show internal directories.
Click to hide internal directories.