Documentation
¶
Index ¶
Constants ¶
View Source
const QUEUE_GET_SIZE = 1024
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Receiver ¶
func NewPuller ¶
func NewPuller(ip string, port int, hwm int, recvBlockTimeout time.Duration, mode ClientOrServer) (Receiver, error)
NewPuller returns ZeroMQ TCP subscribe on specified ip and port
func NewSubscriber ¶
NewSubscriber returns ZeroMQ TCP subscribe on specified ip and port
type Sender ¶
type Sender interface { Send(b []byte) (n int, err error) SendNoBlock(b []byte) (n int, err error) io.Closer }
func NewPublisher ¶
NewPublisher returns ZeroMQ TCP publisher on specified port
type Subscriber ¶
Subscriber is a wrapped ZeroMQ socket for subscribe
func (*Subscriber) RecvNoBlock ¶
func (s *Subscriber) RecvNoBlock() ([]byte, error)
RecvNoBlock from ZeroMQ
type ZMQBytePusher ¶
type ZMQBytePusher struct { Sender // contains filtered or unexported fields }
func NewZMQBytePusher ¶
NewZMQBytePusher 包装zmq pusher
func (*ZMQBytePusher) QueueForward ¶
func (s *ZMQBytePusher) QueueForward(q queue.QueueReader)
QueueForward 不断读取q中的数据,并通过创建的zmq socket向外发送
Click to show internal directories.
Click to hide internal directories.