subscribe

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRedisSubscribe

func NewRedisSubscribe()

Types

type RedisSubscribe

type RedisSubscribe struct {
}

func (*RedisSubscribe) Publish

func (s *RedisSubscribe) Publish(channel string, message any) error

Publish 发布数据

func (*RedisSubscribe) Subscribe

func (s *RedisSubscribe) Subscribe(channel string, callback handler.SubscribeCallback)

Subscribe 订阅消息

type SubPub

type SubPub interface {
	// Subscribe 订阅消息
	Subscribe(channel string, callback handler.SubscribeCallback)
	// Publish 发布消息
	Publish(channel string, message any) error
}

SubPub 消息发布定义

var SubscribeHandler SubPub

Jump to

Keyboard shortcuts

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