Documentation ¶
Index ¶
- Variables
- func Flush(w net.Conn) (err error)
- func HandleCommand(c *C.Command)
- func LockHandleCommand()
- func Send(w net.Conn, b []byte) (err error)
- func SendCommand(w net.Conn, command string, args ...interface{}) error
- func UnlockHandleCommand()
- type CustomConfigT
- type DBConfigT
- type DBManager
- type DBMarshal
- type DebugConfigT
- type KeyDBData
- type RuntimeConfigT
- type ServerConfig
- type SlaverClient
- type SlaverEntry
- type SyncCommand
- type SyncConfigT
- type SyncMgr
- func (this *SyncMgr) DecTotalSyncing()
- func (this *SyncMgr) GetSyncStatus() SyncStatus
- func (this *SyncMgr) IncTotalSyncing()
- func (this *SyncMgr) Info() (s string)
- func (this *SyncMgr) IsMaster() bool
- func (this *SyncMgr) IsReadOnly() bool
- func (this *SyncMgr) IsSlaver() bool
- func (this *SyncMgr) IsSlaverTotalSyncing() bool
- func (this *SyncMgr) IsTotalSyncing() bool
- func (this *SyncMgr) OnCall(c *C.Command)
- func (this *SyncMgr) OnFlushAll()
- func (this *SyncMgr) OnMonitor(monitor net.Conn) error
- func (this *SyncMgr) OnPong(slaver net.Conn)
- func (this *SyncMgr) OnSync(uuid string, seq int64, slaver net.Conn) error
- func (this *SyncMgr) OnSyncKeyEnd()
- func (this *SyncMgr) ResetSync()
- func (this *SyncMgr) SetSyncStatus(s SyncStatus)
- func (this *SyncMgr) Slaveof(host string, port string) error
- func (this *SyncMgr) SlaverStatus() SyncStatus
- func (this *SyncMgr) StartProcessSlavers()
- type SyncStatus
Constants ¶
This section is empty.
Variables ¶
View Source
var Dummy bool
Functions ¶
func LockHandleCommand ¶
func LockHandleCommand()
func UnlockHandleCommand ¶
func UnlockHandleCommand()
Types ¶
type CustomConfigT ¶
type DBConfigT ¶
type DBManager ¶
type DBManager struct {
// contains filtered or unexported fields
}
func (*DBManager) BgSave ¶
----------------------- BGSave ------------------------
func (*DBManager) OnPreCall ¶
--------------------- common -----------------------
type KeyDBData ¶
type KeyDBData struct {
// contains filtered or unexported fields
}
type ServerConfig ¶
type ServerConfig struct { DebugConfig DebugConfigT CustomConfig CustomConfigT RuntimeConfig RuntimeConfigT SyncConfig SyncConfigT DBConfig DBConfigT LogDir string // contains filtered or unexported fields }
func GetServerConfig ¶
func GetServerConfig() *ServerConfig
func (*ServerConfig) DumpConfig ¶
func (this *ServerConfig) DumpConfig() string
func (*ServerConfig) InitFlags ¶
func (this *ServerConfig) InitFlags() error
func (*ServerConfig) IsDump ¶
func (this *ServerConfig) IsDump() bool
type SlaverClient ¶
type SlaverClient struct {
// contains filtered or unexported fields
}
func NewSlaverClient ¶
func NewSlaverClient() *SlaverClient
func (*SlaverClient) Close ¶
func (this *SlaverClient) Close()
func (*SlaverClient) Dial ¶
func (this *SlaverClient) Dial(addr string) (err error)
func (*SlaverClient) StartSync ¶
func (this *SlaverClient) StartSync() error
type SlaverEntry ¶
type SlaverEntry struct {
// contains filtered or unexported fields
}
func (*SlaverEntry) IsForeachEnd ¶
func (this *SlaverEntry) IsForeachEnd() bool
func (*SlaverEntry) Ping ¶
func (this *SlaverEntry) Ping() error
func (*SlaverEntry) Process ¶
func (this *SlaverEntry) Process() (numDone int, err error)
func (*SlaverEntry) PushCommand ¶
func (this *SlaverEntry) PushCommand(c *C.Command)
func (*SlaverEntry) SetForeachEnd ¶
func (this *SlaverEntry) SetForeachEnd()
type SyncCommand ¶
type SyncCommand struct {
// contains filtered or unexported fields
}
type SyncMgr ¶
type SyncMgr struct {
// contains filtered or unexported fields
}
主从同步管理器
func (*SyncMgr) GetSyncStatus ¶
func (this *SyncMgr) GetSyncStatus() SyncStatus
func (*SyncMgr) IsSlaverTotalSyncing ¶
当前是slaver, 并且处于全量同步中
func (*SyncMgr) OnSync ¶
---------------------------------------------------------------- master
func (*SyncMgr) SetSyncStatus ¶
func (this *SyncMgr) SetSyncStatus(s SyncStatus)
func (*SyncMgr) Slaveof ¶
---------------------------------------------------------------- slaver
func (*SyncMgr) SlaverStatus ¶
func (this *SyncMgr) SlaverStatus() SyncStatus
Click to show internal directories.
Click to hide internal directories.