chitin

package module
v0.0.0-...-f56171f Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2016 License: MIT Imports: 3 Imported by: 0

README

Go library for Chitin data file format and protocol

Status: experimental

For background on Chitin, see https://chitin.io/

To get this Go package, run

go get chitin.io/chitin

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.

Directories

Path Synopsis
cmd
examples
Package schema contains the Chitin wire format schema data model and parser.
Package schema contains the Chitin wire format schema data model and parser.

Jump to

Keyboard shortcuts

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