redis_subscribe

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Subscribe

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

func NewSubscribe

func NewSubscribe(redis *redis.Client) *Subscribe

func (*Subscribe) Pub

func (s *Subscribe) Pub(ctx context.Context, topic string, payload string) error

func (*Subscribe) Sub

func (s *Subscribe) Sub(ctx context.Context, topic string, r chan string) error

Sub 订阅消息 TODO 未验证 redis 断线重连,不确定有没有问题

Jump to

Keyboard shortcuts

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