protocol

package
v2.0.8 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2020 License: Apache-2.0 Imports: 3 Imported by: 267

Documentation

Overview

Package protocol implements some common things protocol implementors need. Only protocol implementations should import this package.

Index

Constants

View Source
const (
	ProtoPair       = mangos.ProtoPair
	ProtoPub        = mangos.ProtoPub
	ProtoSub        = mangos.ProtoSub
	ProtoReq        = mangos.ProtoReq
	ProtoRep        = mangos.ProtoRep
	ProtoPush       = mangos.ProtoPush
	ProtoPull       = mangos.ProtoPull
	ProtoSurveyor   = mangos.ProtoSurveyor
	ProtoRespondent = mangos.ProtoRespondent
	ProtoBus        = mangos.ProtoBus
	ProtoStar       = mangos.ProtoStar // Experimental
)

Protocol numbers

View Source
const (
	ErrClosed      = errors.ErrClosed
	ErrSendTimeout = errors.ErrSendTimeout
	ErrRecvTimeout = errors.ErrRecvTimeout
	ErrBadValue    = errors.ErrBadValue
	ErrBadOption   = errors.ErrBadOption
	ErrProtoOp     = errors.ErrProtoOp
	ErrProtoState  = errors.ErrProtoState
	ErrCanceled    = errors.ErrCanceled
)

Borrow common error codes for convenience.

View Source
const (
	OptionRaw          = mangos.OptionRaw
	OptionRecvDeadline = mangos.OptionRecvDeadline
	OptionSendDeadline = mangos.OptionSendDeadline
	OptionRetryTime    = mangos.OptionRetryTime
	OptionSubscribe    = mangos.OptionSubscribe
	OptionUnsubscribe  = mangos.OptionUnsubscribe
	OptionSurveyTime   = mangos.OptionSurveyTime
	OptionWriteQLen    = mangos.OptionWriteQLen
	OptionReadQLen     = mangos.OptionReadQLen
	OptionLinger       = mangos.OptionLinger // Remove?
	OptionTTL          = mangos.OptionTTL
	OptionBestEffort   = mangos.OptionBestEffort
)

Common option definitions We have elided transport-specific options here.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

type Context = mangos.ProtocolContext

Context describes a protocol context.

type Info

type Info = mangos.ProtocolInfo

Info describes a protocol and it's peer.

type Message

type Message = mangos.Message

Message is an alias for the common mangos.Message.

type Pipe

type Pipe = mangos.ProtocolPipe

Pipe is a single connection -- provided by the transport layer.

type Protocol

type Protocol = mangos.ProtocolBase

Protocol is the main ops vector for a protocol.

type Socket

type Socket = mangos.Socket

Socket is the interface definition of a mangos.Socket. We need this for creating new ones.

func MakeSocket

func MakeSocket(proto Protocol) Socket

MakeSocket creates a Socket on top of a Protocol.

Directories

Path Synopsis
Package bus implements the BUS protocol.
Package bus implements the BUS protocol.
Package pair implements the PAIR protocol.
Package pair implements the PAIR protocol.
Package pub implements the PUB protocol.
Package pub implements the PUB protocol.
Package pull implements the PULL protocol, which is the read side of the pipeline pattern.
Package pull implements the PULL protocol, which is the read side of the pipeline pattern.
Package push implements the PUSH protocol, which is the write side of the pipeline pattern.
Package push implements the PUSH protocol, which is the write side of the pipeline pattern.
Package rep implements the REP protocol, which is the response side of the request/response pattern.
Package rep implements the REP protocol, which is the response side of the request/response pattern.
Package req implements the REQ protocol, which is the request side of the request/response pattern.
Package req implements the REQ protocol, which is the request side of the request/response pattern.
Package respondent implements the RESPONDENT protocol, which is the response side of the survey pattern.
Package respondent implements the RESPONDENT protocol, which is the response side of the survey pattern.
Package star implements a new, experimental protocol called "STAR".
Package star implements a new, experimental protocol called "STAR".
Package sub implements the SUB protocol.
Package sub implements the SUB protocol.
Package surveyor implements the SURVEYOR protocol.
Package surveyor implements the SURVEYOR protocol.
Package xbus implements the BUS protocol.
Package xbus implements the BUS protocol.
Package xpair implements the PAIR protocol.
Package xpair implements the PAIR protocol.
Package xpub implements the PUB protocol.
Package xpub implements the PUB protocol.
Package xpull implements the PULL protocol.
Package xpull implements the PULL protocol.
Package xpush implements the raw PUSH protocol.
Package xpush implements the raw PUSH protocol.
Package xrep implements the raw REP protocol, which is the response side of the request/response pattern.
Package xrep implements the raw REP protocol, which is the response side of the request/response pattern.
Package xreq implements the raw REQ protocol, which is the request side of the request/response pattern.
Package xreq implements the raw REQ protocol, which is the request side of the request/response pattern.
Package xrespondent implements the raw RESPONDENT protocol, which is the response side of survey pattern.
Package xrespondent implements the raw RESPONDENT protocol, which is the response side of survey pattern.
Package xstar implements the experimental star protocol.
Package xstar implements the experimental star protocol.
Package xsub implements the raw SUB protocol.
Package xsub implements the raw SUB protocol.
Package xsurveyor implements the SURVEYOR protocol.
Package xsurveyor implements the SURVEYOR protocol.

Jump to

Keyboard shortcuts

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