redis

package
v1.24.8 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2023 License: Apache-2.0 Imports: 5 Imported by: 3

Documentation

Overview

Package redis contains shared functionality related to Redis

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BasicInterface

type BasicInterface interface {
	HealthCheck() error
}

BasicInterface represents an interface for shared Redis-related functions, which will be extended.

func NewRedisClient

func NewRedisClient(
	address string,
	databaseIndex int,
	password string,
	timeoutSeconds int,
) (BasicInterface, error)

NewRedisClient creates a new Redis client based on configuration and returns RedisInterface

type Client

type Client struct {
	Client *redisV9.Client
}

Client is an implementation of the Redis client for Redis server

func (*Client) HealthCheck

func (redis *Client) HealthCheck() (err error)

HealthCheck executes PING command to check for liveness status of Redis server

Jump to

Keyboard shortcuts

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