gmq

package
v1.0.1006 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GMQ

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

消息中间件

func NewGMQ

func NewGMQ() *GMQ

新建GMQ

func (*GMQ) Close

func (this *GMQ) Close()

关闭

func (*GMQ) Publish

func (this *GMQ) Publish(topic string, data any) error

发布

func (*GMQ) Run

func (this *GMQ) Run()

运行

func (*GMQ) Subscribe

func (this *GMQ) Subscribe(topic string, handler Handler)

订阅

type Handler

type Handler func(value any)

处理业务

type Payload

type Payload struct {
	// 主题
	Topic string

	// 内容
	Value any
}

内容

Jump to

Keyboard shortcuts

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