redis

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2021 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetConnection

func GetConnection() (redis.Conn, error)

Get returns a Redis connection from connection pool or error if no connection is available.

func InitPool

func InitPool(host string, port int)

InitPool initializes a Redis connection pool with max. 10 idle connections, 100 max active connections and 240 sec timeout.

func Publish

func Publish(conn redis.Conn, channel string, message []byte) error

Publish takes a Redis connection, the channel name and the message which should be published to that channel.

Types

This section is empty.

Jump to

Keyboard shortcuts

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