modulepackage
8.1.3
Repository: https://github.com/nrfta/go-redis-helpers.git
Documentation: pkg.go.dev
# README
go-redis-helpers
Provides common config and connect for Redis database.
Config
type RedisConfig struct {
Host string
Port int
Database int
Password string
}
Port
is optional and defaults to the standard Redis port: 6379Database
in Redis is an integer.Password
is optional if using Redis in passwordless mode.
Connect
ConnectRedis(c RedisConfig) (*redis.Client, error)
Connect
will attempt to ping the Redis database for up to 5 seconds. If there is
no response after 5 seconds, then the function returns an error.
# Packages
No description provided by the author
# Functions
No description provided by the author
# Constants
No description provided by the author
# Structs
No description provided by the author