Documentation
¶
Index ¶
Constants ¶
View Source
const MaxSize = 4 << 20 // 4MB
MaxSize is the maximum decodable message size.
Variables ¶
View Source
var ( // ErrSize is returned by Decode calls when a message would exceed the maximum // allowed size. ErrSize = fmt.Errorf("proto: message exceeds %dMB", MaxSize>>20) )
Functions ¶
This section is empty.
Types ¶
type Decoder ¶
type Decoder struct {
// contains filtered or unexported fields
}
Decoder reads and decodes Protobuf messages from an io.Reader.
func NewDecoder ¶
func NewDecoder(r Reader, uf UnmarshalFunc) *Decoder
NewDecoder returns a new Decoder that reads from the given io.Reader. If r does not also implement StringReader, it will be wrapped in a bufio.Reader.
type UnmarshalFunc ¶
UnmarshalFunc translates bytes to objects
Click to show internal directories.
Click to hide internal directories.