redis

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const Prefix = "singleCount"

Variables

This section is empty.

Functions

func CountDetail

func CountDetail(prefix string) (res map[string]string, err error)

func GetSingleCount

func GetSingleCount(prefix, req string) (res string, err error)

拿到单个API被哪些IP调用或单个IP调用了哪些API prefix即为需要查看的

func GetTimeAndCountList

func GetTimeAndCountList() (res []string, err error)

func GetToTalCount

func GetToTalCount() (res string, err error)

func New

func New(config *config.Config) *redis.Client

func PullCountAndTime

func PullCountAndTime(res string) (err error)

func SetSingleCount

func SetSingleCount(ipInfo *model.IpInfo) (err error)

func SetTotalCount

func SetTotalCount() error

Types

type TimeAndCount

type TimeAndCount struct {
	Time  string `json:"time"`
	Count string `json:"value"`
}

Jump to

Keyboard shortcuts

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