internal

package
v0.0.0-...-0f97b93 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2023 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxRetries   = 3
	MaxRedirects = 10
	MaxScanCount = 9999
)

redis

View Source
const (
	DefaultCount = 20
)
View Source
const (
	ListProportion = 0.3
)

Variables

This section is empty.

Functions

func CountKeys

func CountKeys(rdb redis.UniversalClient, match string) (int, error)

CountKeys .

func GetKeys

func GetKeys(
	rdb redis.UniversalClient,
	cursor uint64,
	match string,
	count int64,
) <-chan keyMessage

GetKeys .

func New

func New(config Config) (*model, error)

func Or

func Or(queryValues url.Values, key string, b string) string

func OrInt

func OrInt(queryValues url.Values, key string, b int) int

func OrSlice

func OrSlice(queryValues url.Values, key string, bb ...[]string) []string

Types

type Config

type Config struct {
	Username string `mapstructure:"username"`
	Password string `mapstructure:"password"`

	// sentinel
	MasterName string `mapstructure:"master_name"`

	Addrs []string `mapstructure:"addrs"`
	DB    int      `mapstructure:"db"`

	Limit int64 `mapstructure:"limit"` // default 20
}

Config represents the main config for the application.

func Get

func Get() (config Config)

Get returns the users config.

Jump to

Keyboard shortcuts

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