redis

package
v0.4.11 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cli

func Cli() *redis.Client

func CliMulti added in v0.3.11

func CliMulti(key string) *redis.Client

func InitRedis

func InitRedis(rc *RootConfig)

func RateLimit

func RateLimit(ctx context.Context, cli *redis.Client, window, maxCnt int, key string) bool

Types

type RootConfig

type RootConfig struct {
	Config redisConfig             `yaml:"redis"`
	Multi  map[string]*redisConfig `yaml:"redis-multi"`
}

func NewConfig

func NewConfig() *RootConfig

Jump to

Keyboard shortcuts

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