1
0
mirror of https://github.com/redis/go-redis.git synced 2025-04-17 20:17:02 +03:00

Add the reset sentinel command

This commit is contained in:
Étienne Michon 2019-02-20 16:19:42 +01:00
parent 35e2db2f14
commit 64411c1a52
No known key found for this signature in database
GPG Key ID: 3D0A46951838A869

View File

@ -172,6 +172,16 @@ func (c *SentinelClient) Failover(name string) *StatusCmd {
return cmd
}
// Reset resets all the masters with matching name. The pattern argument is a
// glob-style pattern. The reset process clears any previous state in a master
// (including a failover in progress), and removes every slave and sentinel
// already discovered and associated with the master.
func (c *SentinelClient) Reset(pattern string) *IntCmd {
cmd := NewIntCmd("sentinel", "reset", pattern)
c.Process(cmd)
return cmd
}
type sentinelFailover struct {
sentinelAddrs []string