utils

package
v0.0.0-...-70285c8 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2016 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RedisConnConnectTimeout = 1 * time.Second
	RedisConnReadTimeout    = 1 * time.Second
	RedisConnWriteTimeout   = 1 * time.Second
)

Variables

This section is empty.

Functions

func CreatePidFile

func CreatePidFile(name string) error

func GetCoordLock

func GetCoordLock(coordConn zkhelper.Conn, productName string) zkhelper.ZLocker

func GetExecutorPath

func GetExecutorPath() string

func GetRedisConfig

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

func GetRedisInfo

func GetRedisInfo(addr string, section string, auth string) (string, error)

func GetRedisStat

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

func GetRole

func GetRole(addr string, auth string) (string, error)

func InitConfig

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

func InitConfigFromFile

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

func Ping

func Ping(addr string, auth string) error

func SlaveNoOne

func SlaveNoOne(addr string, auth string) error

func SlaveOf

func SlaveOf(slave string, master string, auth string) error

func SlotsInfo

func SlotsInfo(addr string, fromSlot int, toSlot int, auth string) (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

Jump to

Keyboard shortcuts

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