Documentation
¶
Overview ¶
Package msg is 100% generated. If you edit this file, you will lose your changes at the next build cycle. DO NOT MAKE ANY CHANGES YOU WISH TO KEEP.
The correct places for commits are:
- The XML model used for this code generation: zre_msg.xml
- The code generation script that built this file: zproto_codec_go
Index ¶
- Constants
- type Hello
- func (h *Hello) Marshal() ([]byte, error)
- func (h *Hello) RoutingID() []byte
- func (h *Hello) Send(socket *zmq.Socket) (err error)
- func (h *Hello) Sequence() uint16
- func (h *Hello) SetRoutingID(routingID []byte)
- func (h *Hello) SetSequence(sequence uint16)
- func (h *Hello) SetVersion(version byte)
- func (h *Hello) String() string
- func (h *Hello) Unmarshal(frames ...[]byte) error
- func (h *Hello) Version() byte
- type Join
- func (j *Join) Marshal() ([]byte, error)
- func (j *Join) RoutingID() []byte
- func (j *Join) Send(socket *zmq.Socket) (err error)
- func (j *Join) Sequence() uint16
- func (j *Join) SetRoutingID(routingID []byte)
- func (j *Join) SetSequence(sequence uint16)
- func (j *Join) SetVersion(version byte)
- func (j *Join) String() string
- func (j *Join) Unmarshal(frames ...[]byte) error
- func (j *Join) Version() byte
- type Leave
- func (l *Leave) Marshal() ([]byte, error)
- func (l *Leave) RoutingID() []byte
- func (l *Leave) Send(socket *zmq.Socket) (err error)
- func (l *Leave) Sequence() uint16
- func (l *Leave) SetRoutingID(routingID []byte)
- func (l *Leave) SetSequence(sequence uint16)
- func (l *Leave) SetVersion(version byte)
- func (l *Leave) String() string
- func (l *Leave) Unmarshal(frames ...[]byte) error
- func (l *Leave) Version() byte
- type Ping
- func (p *Ping) Marshal() ([]byte, error)
- func (p *Ping) RoutingID() []byte
- func (p *Ping) Send(socket *zmq.Socket) (err error)
- func (p *Ping) Sequence() uint16
- func (p *Ping) SetRoutingID(routingID []byte)
- func (p *Ping) SetSequence(sequence uint16)
- func (p *Ping) SetVersion(version byte)
- func (p *Ping) String() string
- func (p *Ping) Unmarshal(frames ...[]byte) error
- func (p *Ping) Version() byte
- type PingOk
- func (p *PingOk) Marshal() ([]byte, error)
- func (p *PingOk) RoutingID() []byte
- func (p *PingOk) Send(socket *zmq.Socket) (err error)
- func (p *PingOk) Sequence() uint16
- func (p *PingOk) SetRoutingID(routingID []byte)
- func (p *PingOk) SetSequence(sequence uint16)
- func (p *PingOk) SetVersion(version byte)
- func (p *PingOk) String() string
- func (p *PingOk) Unmarshal(frames ...[]byte) error
- func (p *PingOk) Version() byte
- type Shout
- func (s *Shout) Marshal() ([]byte, error)
- func (s *Shout) RoutingID() []byte
- func (s *Shout) Send(socket *zmq.Socket) (err error)
- func (s *Shout) Sequence() uint16
- func (s *Shout) SetRoutingID(routingID []byte)
- func (s *Shout) SetSequence(sequence uint16)
- func (s *Shout) SetVersion(version byte)
- func (s *Shout) String() string
- func (s *Shout) Unmarshal(frames ...[]byte) error
- func (s *Shout) Version() byte
- type Transit
- type Whisper
- func (w *Whisper) Marshal() ([]byte, error)
- func (w *Whisper) RoutingID() []byte
- func (w *Whisper) Send(socket *zmq.Socket) (err error)
- func (w *Whisper) Sequence() uint16
- func (w *Whisper) SetRoutingID(routingID []byte)
- func (w *Whisper) SetSequence(sequence uint16)
- func (w *Whisper) SetVersion(version byte)
- func (w *Whisper) String() string
- func (w *Whisper) Unmarshal(frames ...[]byte) error
- func (w *Whisper) Version() byte
Constants ¶
const ( HelloID uint8 = 1 WhisperID uint8 = 2 ShoutID uint8 = 3 JoinID uint8 = 4 LeaveID uint8 = 5 PingID uint8 = 6 PingOkID uint8 = 7 )
Definition of message IDs
const ( // Signature is put into every protocol message and lets us filter bogus // or unknown protocols. It is a 4-bit number from 0 to 15. Use a unique value // for each protocol you write, at least. Signature uint16 = 0xAAA0 | 1 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Hello ¶
type Hello struct { Endpoint string Groups []string Status byte Name string Headers map[string]string // contains filtered or unexported fields }
Hello struct Greet a peer so it can connect back to us
func (*Hello) RoutingID ¶
RoutingID returns the routingID for this message, routingID should be set whenever talking to a ROUTER.
func (*Hello) SetRoutingID ¶
SetRoutingID sets the routingID for this message, routingID should be set whenever talking to a ROUTER.
func (*Hello) SetSequence ¶
SetSequence sets the sequence.
type Join ¶
Join struct Join a group
func (*Join) RoutingID ¶
RoutingID returns the routingID for this message, routingID should be set whenever talking to a ROUTER.
func (*Join) SetRoutingID ¶
SetRoutingID sets the routingID for this message, routingID should be set whenever talking to a ROUTER.
func (*Join) SetSequence ¶
SetSequence sets the sequence.
type Leave ¶
Leave struct Leave a group
func (*Leave) RoutingID ¶
RoutingID returns the routingID for this message, routingID should be set whenever talking to a ROUTER.
func (*Leave) SetRoutingID ¶
SetRoutingID sets the routingID for this message, routingID should be set whenever talking to a ROUTER.
func (*Leave) SetSequence ¶
SetSequence sets the sequence.
type Ping ¶
type Ping struct {
// contains filtered or unexported fields
}
Ping struct Ping a peer that has gone silent
func (*Ping) RoutingID ¶
RoutingID returns the routingID for this message, routingID should be set whenever talking to a ROUTER.
func (*Ping) SetRoutingID ¶
SetRoutingID sets the routingID for this message, routingID should be set whenever talking to a ROUTER.
func (*Ping) SetSequence ¶
SetSequence sets the sequence.
type PingOk ¶
type PingOk struct {
// contains filtered or unexported fields
}
PingOk struct Reply to a peer's ping
func (*PingOk) RoutingID ¶
RoutingID returns the routingID for this message, routingID should be set whenever talking to a ROUTER.
func (*PingOk) SetRoutingID ¶
SetRoutingID sets the routingID for this message, routingID should be set whenever talking to a ROUTER.
func (*PingOk) SetSequence ¶
SetSequence sets the sequence.
type Shout ¶
Shout struct Send a multi-part message to a group
func (*Shout) RoutingID ¶
RoutingID returns the routingID for this message, routingID should be set whenever talking to a ROUTER.
func (*Shout) SetRoutingID ¶
SetRoutingID sets the routingID for this message, routingID should be set whenever talking to a ROUTER.
func (*Shout) SetSequence ¶
SetSequence sets the sequence.
type Transit ¶
type Transit interface { Marshal() ([]byte, error) Unmarshal(...[]byte) error String() string Send(*zmq.Socket) error SetRoutingID([]byte) RoutingID() []byte SetVersion(byte) Version() byte SetSequence(uint16) Sequence() uint16 }
Transit is a codec interface
func RecvNoWait ¶
RecvNoWait receives marshaled data from 0mq socket. It won't wait for input.
type Whisper ¶
type Whisper struct { Content []byte // contains filtered or unexported fields }
Whisper struct Send a multi-part message to a peer
func (*Whisper) RoutingID ¶
RoutingID returns the routingID for this message, routingID should be set whenever talking to a ROUTER.
func (*Whisper) SetRoutingID ¶
SetRoutingID sets the routingID for this message, routingID should be set whenever talking to a ROUTER.
func (*Whisper) SetSequence ¶
SetSequence sets the sequence.
func (*Whisper) SetVersion ¶
SetVersion sets the version.