package framing
import "github.com/mesos/mesos-go/api/v1/lib/encoding/framing"
Index ¶
Constants ¶
const MaxSize = 4 << 20 // 4MB
MaxSize is the maximum decodable message size.
Variables ¶
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) )
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.
func (*Decoder) Decode ¶
Decode reads the next Protobuf-encoded message from its input and stores it in the value pointed to by m. If m isn't a proto.Message, Decode will panic.
type Reader ¶
type UnmarshalFunc ¶
UnmarshalFunc translates bytes to objects
Source Files ¶
- Version
- v0.0.3
- Published
- Jun 19, 2017
- Platform
- windows/amd64
- Imports
- 1 packages
- Last checked
- 1 hour ago –
Tools for package owners.