pub_sub

package
v0.0.0-...-3d3caa2 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ExchangeName       = "Go-Sub-Pub-Exchange"
	ExchangeNameBackup = "Go-Sub-Pub-Exchange-Backup"
)

Variables

This section is empty.

Functions

func Init

func Init()

func Publish

func Publish(topic string, data interface{}) error

func Subscribe

func Subscribe(topic string, onMessageReceive OnMessageReceive, args ...interface{}) <-chan struct{}

Types

type OnMessageReceive

type OnMessageReceive func(data interface{}) bool

type ReSendMsg

type ReSendMsg struct {
	RetryTimes    uint8
	NextRetryTime int64
	Data          interface{}
}

Jump to

Keyboard shortcuts

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