mq

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Host          string              `json:"host"`
	Port          string              `json:"port"`
	DashboardHost string              `json:"dashboard_host"`
	DashboardPort string              `json:"dashboard_port"`
	MaxOpenConn   int                 `json:"max_open_conn"` // 允许的最大连接数, 即 生产者+消费者最多有 MaxOpenConn 个
	BufferSize    int                 `json:"buffer_size"`   // 生产者消息历史记录最大数量
	Logger        logger.Iface        `json:"-"`
	Crypto        proto.Crypto        `json:"-"` // 加密器
	EventHandler  engine.EventHandler // 事件触发器
}

func DefaultConf

func DefaultConf() Config

type MQ

type MQ struct {
	// contains filtered or unexported fields
}

func New

func New(cs ...Config) *MQ

func (*MQ) Run

func (m *MQ) Run()

Run 阻塞启动

func (*MQ) Stop

func (m *MQ) Stop()

Jump to

Keyboard shortcuts

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