utils

package
v0.0.0-...-b3805cb Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2014 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetRedisConfig

func GetRedisConfig(addr string, configName string) (string, error)

func GetRedisStat

func GetRedisStat(addr string) (map[string]string, error)

func GetZkLock

func GetZkLock(zkConn zkhelper.Conn, productName string) zkhelper.ZLocker

func InitConfig

func InitConfig() (*cfg.Cfg, error)

func InitConfigFromFile

func InitConfigFromFile(filename string) (*cfg.Cfg, error)

func SlaveNoOne

func SlaveNoOne(addr string) error

func SlotsInfo

func SlotsInfo(addr string, fromSlot, toSlot int) (map[int]int, error)

get redis's slot size

Types

type Strings

type Strings []string

func (Strings) Eq

func (s1 Strings) Eq(s2 []string) bool

type Token

type Token struct {
}

type TokenLimiter

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

func NewTokenLimiter

func NewTokenLimiter(count int) *TokenLimiter

func (*TokenLimiter) Get

func (tl *TokenLimiter) Get() *Token

func (*TokenLimiter) Put

func (tl *TokenLimiter) Put(tk *Token)

Jump to

Keyboard shortcuts

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