redis

package
v0.0.0-...-fda0d6a Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2024 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const SEND_ACK_CHANNEL channel = "ACK_MESSAGE"
View Source
const SEND_SYSTEM_CHANNEL channel = "SYSTEM_MESSAGE"
View Source
const USER_MSG channel = "USER_MESSAGE"

Channel names

Variables

View Source
var Redis *redis.Client

Redis client

Functions

func ListenChannels

func ListenChannels()

Listening to redis channels

func PublishMsg

func PublishMsg(msg message.ServerMsg, channel channel) error

Publishing user message to channel

func ReadMessages

func ReadMessages(ch channel)

Read messages from channel and send to clients

func SetUp

func SetUp()

Connecting and start redis pub-sub

func Subscribe

func Subscribe(userId string, connectionId string, ch chan message.Msg)

Subscribing connection for messages

func UnSubscribe

func UnSubscribe(userId string, connectionId string)

Removing connection from connections map

Types

This section is empty.

Jump to

Keyboard shortcuts

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