db

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessRedisDB

type AccessRedisDB = iface.AccessRedisDB

type Config

type Config struct {
	DbAddr   string
	PoolFIFO bool
	Dialer   func(ctx context.Context, network, address string) (net.Conn, error)
}

type ReadOnlyRedisDB

type ReadOnlyRedisDB = iface.ReadOnlyRedisDB

type RedisDB

type RedisDB = iface.RedisDB

type Service

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

func NewRedisClient

func NewRedisClient(ctx context.Context, cfg *Config) (*Service, error)

func (*Service) Del

func (s *Service) Del(key string) error

func (*Service) Get

func (s *Service) Get(key string) (string, error)

func (*Service) RedisClient

func (s *Service) RedisClient() *redis.Client

func (*Service) Set

func (s *Service) Set(key, value string) error

func (*Service) SetRedisClient

func (s *Service) SetRedisClient(client *redis.Client)

func (*Service) SetRedisConn

func (s *Service) SetRedisConn()

func (*Service) Start

func (s *Service) Start()

func (*Service) Started

func (s *Service) Started() bool

func (*Service) Stop

func (s *Service) Stop() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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