redisconn

package
v0.2.8 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Conn

type Conn struct{ *redis.Client }

Conn wraps connection with the Redis.

func New

func New(addr string, options ...Option) (*Conn, error)

New returns a pointer to a new instance of the Conn struct.

func (*Conn) HealthCheck

func (c *Conn) HealthCheck(ctx context.Context) error

type Option

type Option func(o *redis.Options)

Option modifies the redis.Options.

func WithClientName

func WithClientName(name string) Option

WithClientName sets the client name for the Redis connection.

func WithCredentials

func WithCredentials(username, password string) Option

WithCredentials sets the credentials for the Redis connection.

Jump to

Keyboard shortcuts

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