zenio

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

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

Go to latest
Published: Nov 6, 2013 License: Apache-2.0 Imports: 14 Imported by: 0

README

ZenIO for zmq and nanomsg in Go

Package zenio implements ØMQ (ZMTP) and nanomsg (SP) in Go without any dependencies on zeromq or nanomsg.

This is a work in progress and is considered very experimental. Expect it to change or break in unexpected ways. Use at own risk.

Installing

Using go get

$ go get github.com/op/zenio

After this command zenio is ready to use. Its source will be in:

$GOROOT/src/pkg/github.com/op/zenio

You can use go get -u -a to update all installed packages.

Documentation

For docs, see http://godoc.org/github.com/op/zenio or run:

$ go doc github.com/op/zenio

Documentation

Overview

Package zenio implements ØMQ (ZMTP) and nanomsg (SP) in Go without any dependencies on zeromq or nanomsg.

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultSP   = &sp.Negotiator{}
	DefaultZMTP = &zmtp.Negotiator{}
)

Functions

func Dial

func Dial(scheme, network string, debug bool) (*socket, error)

Dial

func Listen

func Listen(network, address string, debug bool) (*socket, error)

Types

type BufferMessage

type BufferMessage struct {
	M protocol.Message
	// contains filtered or unexported fields
}

BufferMessage adds buffering to a message. It makes it possible to read the whole message into memory and rewind it again.

func NewBufferMessage

func NewBufferMessage(m protocol.Message) *BufferMessage

func (*BufferMessage) More

func (b *BufferMessage) More() bool

func (*BufferMessage) Next

func (b *BufferMessage) Next() (protocol.Frame, error)

func (*BufferMessage) Reset

func (b *BufferMessage) Reset()

type BytesMessage

type BytesMessage struct {
	// contains filtered or unexported fields
}

func NewBytesMessage

func NewBytesMessage(frames [][]byte) *BytesMessage

func (*BytesMessage) More

func (b *BytesMessage) More() bool

func (*BytesMessage) Next

func (b *BytesMessage) Next() (protocol.Frame, error)

func (*BytesMessage) Reset

func (b *BytesMessage) Reset()

type Envelope

type Envelope interface {
	LocalAddr() string
}

type Identity

type Identity []byte

type Protocol

type Protocol interface {
	// Send encodes the protocol data from Envelope and Message and writes it to
	// the underlying writer.
	Send(Envelope, protocol.Message) error

	// Recv reads protocol data from the underlying reader and decodes it into
	// Envelope and Message.
	Recv(Envelope, protocol.Message) error
}

Directories

Path Synopsis
Package perf contains utility functions for the performance programs of zenio.
Package perf contains utility functions for the performance programs of zenio.
Protocol contains the abstraction required for protocols in Zenio.
Protocol contains the abstraction required for protocols in Zenio.
sp
Package sp implements the wire format used for Scalable Protocols.
Package sp implements the wire format used for Scalable Protocols.
zmtp
Package zmtp implements the wire format used in ZMTP, the ZeroMQ Message Transport Protocol.
Package zmtp implements the wire format used in ZMTP, the ZeroMQ Message Transport Protocol.

Jump to

Keyboard shortcuts

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