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: zgossip_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) SetRoutingID(routingID []byte)
- func (h *Hello) SetVersion(version byte)
- func (h *Hello) String() string
- func (h *Hello) Unmarshal(frames ...[]byte) error
- func (h *Hello) Version() byte
- type Invalid
- func (i *Invalid) Marshal() ([]byte, error)
- func (i *Invalid) RoutingID() []byte
- func (i *Invalid) Send(socket *zmq.Socket) (err error)
- func (i *Invalid) SetRoutingID(routingID []byte)
- func (i *Invalid) SetVersion(version byte)
- func (i *Invalid) String() string
- func (i *Invalid) Unmarshal(frames ...[]byte) error
- func (i *Invalid) 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) SetRoutingID(routingID []byte)
- func (p *Ping) SetVersion(version byte)
- func (p *Ping) String() string
- func (p *Ping) Unmarshal(frames ...[]byte) error
- func (p *Ping) Version() byte
- type Pong
- func (p *Pong) Marshal() ([]byte, error)
- func (p *Pong) RoutingID() []byte
- func (p *Pong) Send(socket *zmq.Socket) (err error)
- func (p *Pong) SetRoutingID(routingID []byte)
- func (p *Pong) SetVersion(version byte)
- func (p *Pong) String() string
- func (p *Pong) Unmarshal(frames ...[]byte) error
- func (p *Pong) Version() byte
- type Publish
- func (p *Publish) Marshal() ([]byte, error)
- func (p *Publish) RoutingID() []byte
- func (p *Publish) Send(socket *zmq.Socket) (err error)
- func (p *Publish) SetRoutingID(routingID []byte)
- func (p *Publish) SetVersion(version byte)
- func (p *Publish) String() string
- func (p *Publish) Unmarshal(frames ...[]byte) error
- func (p *Publish) Version() byte
- type Transit
Constants ¶
const ( HelloID uint8 = 1 PublishID uint8 = 2 PingID uint8 = 3 PongID uint8 = 4 InvalidID uint8 = 5 )
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 | 0 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Hello ¶
type Hello struct {
// contains filtered or unexported fields
}
Hello struct Client says hello to server
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.
type Invalid ¶
type Invalid struct {
// contains filtered or unexported fields
}
Invalid struct Server rejects command as invalid
func (*Invalid) RoutingID ¶
RoutingID returns the routingID for this message, routingID should be set whenever talking to a ROUTER.
func (*Invalid) SetRoutingID ¶
SetRoutingID sets the routingID for this message, routingID should be set whenever talking to a ROUTER.
func (*Invalid) SetVersion ¶
SetVersion sets the version.
type Ping ¶
type Ping struct {
// contains filtered or unexported fields
}
Ping struct Client signals liveness
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.
type Pong ¶
type Pong struct {
// contains filtered or unexported fields
}
Pong struct Server responds to ping; note that pongs are not correlated with pings, and may be mixed with other commands, and the client should treat any incoming traffic as valid activity.
func (*Pong) RoutingID ¶
RoutingID returns the routingID for this message, routingID should be set whenever talking to a ROUTER.
func (*Pong) SetRoutingID ¶
SetRoutingID sets the routingID for this message, routingID should be set whenever talking to a ROUTER.
type Publish ¶
type Publish struct { Key string Value string Ttl uint32 // contains filtered or unexported fields }
Publish struct Client or server announces a new tuple
func (*Publish) RoutingID ¶
RoutingID returns the routingID for this message, routingID should be set whenever talking to a ROUTER.
func (*Publish) SetRoutingID ¶
SetRoutingID sets the routingID for this message, routingID should be set whenever talking to a ROUTER.
func (*Publish) SetVersion ¶
SetVersion sets the version.
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 }
Transit is a codec interface
func RecvNoWait ¶
RecvNoWait receives marshaled data from 0mq socket. It won't wait for input.