kredis

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Subscribes = make([]*Subscribe, 0)

Functions

func Close

func Close() error

Close 消息订阅关闭

Types

type Subscribe

type Subscribe struct {
	DbRedis *redis.Client
	// contains filtered or unexported fields
}

func Init

func Init(ctx context.Context, client *redis.Client, channels map[string]func(ctx context.Context, pubSub *redis.PubSub)) *Subscribe

Init 全局 Subscribe 初始化

func (*Subscribe) Sub

func (s *Subscribe) Sub(ctx context.Context, channel string) *redis.PubSub

Sub 订阅

Jump to

Keyboard shortcuts

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