mirror of
https://github.com/HDT3213/godis.git
synced 2025-10-06 01:07:06 +08:00
WIP
This commit is contained in:
@@ -34,6 +34,11 @@ func (cluster *Cluster) Relay(peerId string, c redis.Connection, cmdLine [][]byt
|
||||
return cli.Send(cmdLine)
|
||||
}
|
||||
|
||||
// LocalExec executes command at local node
|
||||
func (cluster *Cluster) LocalExec(c redis.Connection, cmdLine [][]byte) redis.Reply {
|
||||
return cluster.db.Exec(c, cmdLine)
|
||||
}
|
||||
|
||||
// GetPartitionKey extract hashtag
|
||||
func GetPartitionKey(key string) string {
|
||||
beg := strings.Index(key, "{")
|
||||
@@ -65,4 +70,4 @@ func execRaftCommittedIndex(cluster *Cluster, c redis.Connection, cmdLine CmdLin
|
||||
return protocol.MakeErrReply(err.Error())
|
||||
}
|
||||
return protocol.MakeIntReply(int64(index))
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user