encoding

package
v0.0.0-...-8a93dc7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 28, 2021 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterCodec

func RegisterCodec(codec Codec)

RegisterCodec registers the provided Codec for use with all HTTP/gRPC clients and servers.

func RegisterCompressor

func RegisterCompressor(c Compressor)

RegisterCompressor registers the compressor with HTTP/gRPC by its name.

Types

type Codec

type Codec encoding.Codec

Codec defines the interface HTTP/gRPC uses to encode and decode messages. Note that implementations of this interface must be thread safe; a Codec's methods can be called from concurrent goroutines.

func GetCodec

func GetCodec(contentSubtype string) Codec

GetCodec gets a registered Codec by content-subtype, or nil if no Codec is registered for the content-subtype.

The content-subtype is expected to be lowercase.

type Compressor

type Compressor encoding.Compressor

Compressor is used for compressing and decompressing when sending or receiving messages.

func GetCompressor

func GetCompressor(name string) Compressor

GetCompressor returns Compressor for the given compressor name.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL