redis

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Broker

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

func NewBroker

func NewBroker(conn *Connection) *Broker

func (*Broker) Publish

func (b *Broker) Publish(ctx context.Context, message *model.Message) error

func (*Broker) Subscribe

func (b *Broker) Subscribe(ctx context.Context, roomId string) <-chan *model.Message

type Connection

type Connection struct {
	Rdb *redis.Client
}

func Connect

func Connect(url string) *Connection

Jump to

Keyboard shortcuts

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