redis

package
v0.0.0-...-2ba808a Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package redis abstracts Redis or a key-value database implementation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get() *redis.Client

Get gets the instance of singleton

func Setup

func Setup(c Config) error

Setup creates redis client

Types

type Config

type Config struct {
	ConnectionString   string // if this field is non empty then other fields will be ignore when building connection string
	Host               string
	Port               int
	Database           int
	User               string
	Pass               string
	PoolSize           int
	IdleTimeout        int
	ReadTimeout        int
	WriteTimeout       int
	MinIdleConns       int
	InsecureSkipVerify bool
	TLS                bool
}

Config redis for redis server

func (*Config) ParseConfig

func (c *Config) ParseConfig() error

ParseConfig return redis config from connection string

Jump to

Keyboard shortcuts

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