Skip to content

Commit

Permalink
Add the reset sentinel command
Browse files Browse the repository at this point in the history
  • Loading branch information
EtienneM committed Feb 20, 2019
1 parent 35e2db2 commit 64411c1
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions sentinel.go
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 64411c1

Please sign in to comment.