 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
Constants ¶
      View Source
      
  
const ( ErrorUnderrun = Error("frame underrun, unexpected EOF") ErrorBadSize = Error("bad frame size") ErrorOversizedFrame = Error("oversized frame, max size exceeded") )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Decoder ¶
type Decoder interface {
	// Decode reads the next 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.
	Decode(interface{}) error
}
    Decoder reads and decodes Protobuf messages from an io.Reader.
type DecoderFunc ¶ added in v0.0.4
type DecoderFunc func(interface{}) error
    DecoderFunc is the functional adaptation of Decoder
func NewDecoder ¶
func NewDecoder(r Reader, uf UnmarshalFunc) DecoderFunc
NewDecoder returns a new Decoder that reads from the given frame Reader.
func (DecoderFunc) Decode ¶ added in v0.0.4
func (f DecoderFunc) Decode(m interface{}) error
type ReaderFunc ¶ added in v0.0.4
ReaderFunc is the functional adaptation of Reader.
func (ReaderFunc) ReadFrame ¶ added in v0.0.4
func (f ReaderFunc) ReadFrame() ([]byte, error)
type UnmarshalFunc ¶
UnmarshalFunc translates bytes to objects
type Writer ¶ added in v0.0.4
Writer sends whole frames to some endpoint; returns io.ErrShortWrite if the frame is only partially written.
type WriterFunc ¶ added in v0.0.4
WriterFunc is the functional adaptation of Writer.
func (WriterFunc) WriteFrame ¶ added in v0.0.4
func (f WriterFunc) WriteFrame(b []byte) error
 Click to show internal directories. 
   Click to hide internal directories.