client

package
v1.11.2 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const MONITOR_MAX_OPS uint64 = 1000

Max ops per second for monitor usage

Variables

View Source
var Prompt = "> "

Prompt is prompt symbol

View Source
var UseColoredPrompt = false

UseColoredPrompt enable colors in CLI prompt

Functions

func ExecRedisCmd

func ExecRedisCmd(cfg *Config) error

ExecRedisCmd simply execute given command

func RunRedisCli

func RunRedisCli(cfg *Config) error

RunRedisCli run interactive cli

Types

type CommandInfo

type CommandInfo struct {
	Name        string
	Params      []string
	IsSupported bool
}

CommandInfo is struct with info about command (name, params, support flag)

type Config

type Config struct {
	ID             int      // Instance ID
	Port           int      // Redis port
	DB             int      // DB index
	User           string   // ACL password
	Password       string   // ACL password
	Command        []string // Command
	HistoryFile    string   // Path to history file
	Timeout        int      // Connection timeout
	DisableMonitor bool     // Disable MONITOR command flag
	RawOutput      bool     // Raw output flag
}

Config contains cli configuration

Jump to

Keyboard shortcuts

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