client

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RedisClient

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

func NewRedisClient

func NewRedisClient(opts *RedisOptions, logger *slog.Logger) (*RedisClient, error)

func (*RedisClient) Get

func (rc *RedisClient) Get(key string) (string, error)

type RedisOptions

type RedisOptions struct {
	Host     string `flag:"host" default:"127.0.0.1" usage:"redis服务ip地址" validate:"required"`
	Port     int    `flag:"port" default:"6379" usage:"redis服务端口"`
	DB       int    `flag:"db" default:"0" usage:"redis db"`
	User     string `flag:"user" default:"root" usage:"redis用户名"`
	Password string `flag:"password" default:"xxx" usage:"redis密码"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳