zmq

package
v1.4.3 Latest Latest
Warning

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

Go to latest
Published: May 11, 2023 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ZMQRShwm ZMQRShwm
	ZMQRShwm = 7000 // 0MQ缓存队列大小
)

Functions

This section is empty.

Types

type ZeroMQ

type ZeroMQ struct {
	Log     logger.Logger // 日志
	Verbose bool          // 是否打印信息
	Pull    *ZeroMQArgs
	Push    *ZeroMQArgs
	Pub     *ZeroMQArgs
	Sub     *ZeroMQArgs
	// contains filtered or unexported fields
}

ZeroMQ zeromq

func (*ZeroMQ) ClosePush

func (z *ZeroMQ) ClosePush()

ClosePush close push goroutine

func (*ZeroMQ) PushData

func (z *ZeroMQ) PushData(f string, d []byte)

PushData push data

func (*ZeroMQ) StartProxy

func (z *ZeroMQ) StartProxy()

StartProxy start a 0MQ proxy

func (*ZeroMQ) StartPush

func (z *ZeroMQ) StartPush() error

StartPush start 0MQ push

func (*ZeroMQ) StartSub

func (z *ZeroMQ) StartSub() error

StartSub start 0MQ sub

func (*ZeroMQ) SubData

func (z *ZeroMQ) SubData() *ZeroMQData

SubData sub data use channel

type ZeroMQArgs

type ZeroMQArgs struct {
	ConnStr          string        // 连接字符串
	Timeo            time.Duration // IO超时
	ChannelCache     int           // 信号通道大小,默认2k
	Subscribe        []string      //  sub过滤器
	ReconnectIfTimeo bool
}

ZeroMQArgs 0MQ args

type ZeroMQData

type ZeroMQData struct {
	RoutingKey string
	Body       []byte
}

ZeroMQData 0MQ data

Jump to

Keyboard shortcuts

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