mirror of
https://github.com/HDT3213/godis.git
synced 2025-10-05 08:46:56 +08:00
re-generate aof file during load database from replication master; Allow master-slave role switching
This commit is contained in:
@@ -94,6 +94,13 @@ func (c *Connection) Write(b []byte) (int, error) {
|
||||
return c.conn.Write(b)
|
||||
}
|
||||
|
||||
func (c *Connection) Name() string {
|
||||
if c.conn != nil {
|
||||
return c.conn.RemoteAddr().String()
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
// Subscribe add current connection into subscribers of the given channel
|
||||
func (c *Connection) Subscribe(channel string) {
|
||||
c.mu.Lock()
|
||||
|
Reference in New Issue
Block a user