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_goczmq
Index ¶
- Constants
- type Hello
- func (h *Hello) Marshal() ([]byte, error)
- func (h *Hello) RoutingId() []byte
- func (h *Hello) Send(sock *goczmq.Sock) (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(sock *goczmq.Sock) (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(sock *goczmq.Sock) (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(sock *goczmq.Sock) (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(sock *goczmq.Sock) (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 )
const (
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
}
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
}
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
}
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
}
Server responds to ping; note that pongs are not correlated with pings,
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 }
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(*goczmq.Sock) 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.