redisdb

package
v0.3.11-rc2 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package implements the redis database helpers

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetRedis

func GetRedis() *goredis.Client

GetRedis function returns a pointer to the `goredis.Client` instance used to communicate with Redis server. The function simply returns the Redis client instance stored in a `redisdb` singleton object. This function is used to obtain the Redis client connection in other parts of the application.

func New

func New(dbc *databasecredhelper.VaultDBCredentials, host string, port string) *rediscon

func Ping

func Ping() bool

Ping the redis connection

Types

type RedisDB

type RedisDB interface {
	Get(ctx context.Context, key string, output *string) error
	Set(ctx context.Context, key string, value interface{}, expiration time.Duration) error
	Delete(ctx context.Context, key string) error
	GetJSON(context.Context, string, string, interface{}) error
	SetJSON(ctx context.Context, key string, path string, value interface{}) error
	clients.CommonClient
}

Jump to

Keyboard shortcuts

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