Merge pull request #223 from anmic/feature/cluster-reset

commands: add cluster reset function.
This commit is contained in:
Vladimir Mihailenco 2015-12-22 11:48:42 +02:00
commit 2be29240c7
1 changed files with 12 additions and 0 deletions

View File

@ -1674,6 +1674,18 @@ func (c *commandable) ClusterReplicate(nodeID string) *StatusCmd {
return cmd return cmd
} }
func (c *commandable) ClusterResetSoft() *StatusCmd {
cmd := newKeylessStatusCmd("CLUSTER", "reset", "soft")
c.Process(cmd)
return cmd
}
func (c *commandable) ClusterResetHard() *StatusCmd {
cmd := newKeylessStatusCmd("CLUSTER", "reset", "hard")
c.Process(cmd)
return cmd
}
func (c *commandable) ClusterInfo() *StringCmd { func (c *commandable) ClusterInfo() *StringCmd {
cmd := NewStringCmd("CLUSTER", "info") cmd := NewStringCmd("CLUSTER", "info")
cmd._clusterKeyPos = 0 cmd._clusterKeyPos = 0