utils

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Close

func Close(client *redis.Client)

func Connection

func Connection(host string, port int, password string, db int) *redis.Client

func ConnectionToDb

func ConnectionToDb(db int) *redis.Client

func GetDatabases

func GetDatabases(client *redis.Client) map[uint64]int64

func InitConfig

func InitConfig(host string, port int, password string)

func InitProgressBar

func InitProgressBar(p *mpb.Progress, barTitle string, total int64) *mpb.Bar

func StartProgressBar

func StartProgressBar(wg *sync.WaitGroup, width int) *mpb.Progress

Types

type DBReports

type DBReports map[uint64][]Report

type KeyReports

type KeyReports map[string]Report

type RedisConfig

type RedisConfig struct {
	// contains filtered or unexported fields
}

type Report

type Report struct {
	Key   string `json:"key"`
	Count uint64 `json:"count"`
	Size  uint64 `json:"size"`
}

type SizeReports

type SizeReports []Report

func (SizeReports) Len

func (sr SizeReports) Len() int

func (SizeReports) Less

func (sr SizeReports) Less(i, j int) bool

func (SizeReports) Swap

func (sr SizeReports) Swap(i, j int)

Jump to

Keyboard shortcuts

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