Documentation ¶
Index ¶
- Constants
- Variables
- func AuthPassword(c net.Conn, auth_type, passwd string)
- func CheckHandleNetError(err error) bool
- func Float64ToByte(float float64) string
- func FlushWriter(w *bufio.Writer)
- func GetFakeSlaveOffset(c redigo.Conn) (string, error)
- func GetLocalIp(preferdInterfaces []string) (ip string, interfaceName string, err error)
- func GetRedisVersion(target, authType, auth string) (string, error)
- func Goodbye()
- func InitHttpApi(port int)
- func Iocopy(r io.Reader, w io.Writer, p []byte, max int) int
- func KeyToSlot(key string) uint16
- func NewRDBLoader(reader *bufio.Reader, rbytes *atomic2.Int64, size int) chan *rdb.BinEntry
- func OpenNetConn(target, auth_type, passwd string) net.Conn
- func OpenNetConnSoft(target, auth_type, passwd string) net.Conn
- func OpenReadFile(name string) (*os.File, int64)
- func OpenReadWriteFile(name string) *os.File
- func OpenRedisConn(target, auth_type, passwd string) redigo.Conn
- func OpenRedisConnWithTimeout(target, auth_type, passwd string, readTimeout, writeTimeout time.Duration) redigo.Conn
- func OpenSyncConn(target string, auth_type, passwd string) (net.Conn, <-chan int64)
- func OpenWriteFile(name string) *os.File
- func ParseInfo(content []byte) map[string]string
- func ParseRedisInfo(content []byte) map[string]string
- func ReadRESPEnd(c net.Conn) (string, error)
- func RemoveRESPEnd(input string) string
- func RestoreRdbEntry(c redigo.Conn, e *rdb.BinEntry)
- func SelectDB(c redigo.Conn, db uint32)
- func SendPSyncAck(bw *bufio.Writer, offset int64) error
- func SendPSyncContinue(br *bufio.Reader, bw *bufio.Writer, runid string, offset int64)
- func SendPSyncFullsync(br *bufio.Reader, bw *bufio.Writer) (string, int64, <-chan int64)
- func SendPSyncListeningPort(c net.Conn, port int)
- func Welcome()
- func WritePid(id string) (err error)
- func WritePidById(id string, path string) error
Constants ¶
View Source
const ( GolangSecurityTime = "2006-01-02T15:04:05Z" // GolangSecurityTime = "2006-01-02 15:04:05" ReaderBufferSize = bytesize.MB * 32 WriterBufferSize = bytesize.MB * 8 LogLevelNone = "none" LogLevelError = "error" LogLevelWarn = "warn" LogLevelInfo = "info" LogLevelAll = "all" )
View Source
const ( KB = 1024 MB = 1024 * KB GB = 1024 * MB TB = 1024 * GB PB = 1024 * TB )
Variables ¶
View Source
var ( Version = "$" LogRotater *logRotate.Logger StartTime string )
View Source
var (
HttpApi *nimo.HttpRestProvider
)
Functions ¶
func AuthPassword ¶
func CheckHandleNetError ¶
func Float64ToByte ¶
func FlushWriter ¶
func GetLocalIp ¶
func GetRedisVersion ¶
func InitHttpApi ¶
func InitHttpApi(port int)
func NewRDBLoader ¶
func OpenNetConn ¶
func OpenNetConnSoft ¶
func OpenReadWriteFile ¶
func OpenRedisConn ¶
func OpenSyncConn ¶
func OpenWriteFile ¶
func ParseRedisInfo ¶
func ReadRESPEnd ¶
read until hit the end of RESP: "\r\n"
func RemoveRESPEnd ¶
func SendPSyncContinue ¶
func SendPSyncFullsync ¶
func SendPSyncListeningPort ¶
func WritePidById ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.