redis

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotEnoughArgs error = errors.New("Not enough command arguments")

Functions

func AppendSwapInfo

func AppendSwapInfo(info *redy.Info)

AppendSwapInfo appends info about swap usage to basic redis info

func ExecCommand

func ExecCommand(req *Request) (*redy.Resp, error)

ExecCommand executes some command on redis instance

func GetConfig

func GetConfig(req *Request) (*redy.Config, error)

GetConfig read and parse in-memory config

func GetInfo

func GetInfo(req *Request) (*redy.Info, error)

GetInfo executes INFO command and parse output to struct

func ReadConfig

func ReadConfig(file string) (*redy.Config, error)

ReadConfig read and parse redis config file

Types

type Auth

type Auth struct {
	User     string
	Password string
}

func (Auth) IsEmpty

func (a Auth) IsEmpty() bool

IsEmpty returns true if auth data is empty

type Config

type Config = redy.Config

type ConfigPropDiff

type ConfigPropDiff struct {
	PropName  string
	FileValue string
	MemValue  string
}

func GetConfigsDiff

func GetConfigsDiff(fileConfig, memConfig *Config) []ConfigPropDiff

GetConfigsDiff returns difference between file and in memory configurations

type Info

type Info = redy.Info

type Request

type Request struct {
	Command []string
	Auth    Auth
	Port    int
	DB      int
	Timeout time.Duration
}

type Resp

type Resp = redy.Resp

type RespType

type RespType = redy.RespType
const (
	STR_SIMPLE RespType = 1 << iota
	STR_BULK
	INT
	ARRAY
	NIL

	ERR_IO
	ERR_REDIS

	STR = STR_SIMPLE | STR_BULK
	ERR = ERR_IO | ERR_REDIS
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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