Documentation
¶
Overview ¶
Package chitin provides support functions and types for the Chitin wire format.
For more on the Chitin format, see https://chitin.io/
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrWrongSize is the error returned when data is of an unexpected size. ErrWrongSize = errors.New("message length does not match") // ErrIsPadding is returned when an envelope contains no data. ErrIsPadding = errors.New("unexpected padding") // ErrUnknownMessageKind is the error returned when an envelope // contains an unrecognized message kind. ErrUnknownMessageKind = errors.New("unknown message kind") )
Functions ¶
This section is empty.
Types ¶
type FramedView ¶
type FramedView struct {
// contains filtered or unexported fields
}
FramedView is a view on framed bytes.
See https://chitin.io/spec/v1/#f-e-m
func NewFramedView ¶
func NewFramedView(data []byte) *FramedView
NewFramedView opens a view on the bytes given, providing access to framed contents as bytes.
func (*FramedView) Next ¶
func (v *FramedView) Next() ([]byte, error)
Next returns the contents of the next frame.
Returns io.EOF if there are no more frames. Returns io.ErrUnexpectedEOF on truncated data.
Click to show internal directories.
Click to hide internal directories.