redisconn

package module
v0.0.0-...-63ca6ef Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Connect

func Connect(cfg Config) (cl *redis.Client, err error)

Types

type Config

type Config struct {
	Host     string `validate:"required"`
	Port     uint16 `validate:"required"`
	Username string
	Password string
	DB       int
}

type Conn

type Conn struct {
	// contains filtered or unexported fields
}

func New

func New(cfg Config) (*Conn, error)

func (*Conn) Client

func (c *Conn) Client() *redis.Client

func (*Conn) GetName

func (c *Conn) GetName() string

func (*Conn) Start

func (c *Conn) Start(_ context.Context) error

func (*Conn) Stop

func (c *Conn) Stop(_ context.Context) error

Jump to

Keyboard shortcuts

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