Skip to content

Commit

Permalink
Merge pull request redis#982 from EtienneM/fix/sentinel_commands
Browse files Browse the repository at this point in the history
Add a couple of sentinel commands
  • Loading branch information
vmihailenco authored Mar 1, 2019
2 parents d22fde8 + c340532 commit 69c8af3
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions sentinel.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,21 @@ func (c *SentinelClient) Reset(pattern string) *IntCmd {
return cmd
}

// FlushConfig forces Sentinel to rewrite its configuration on disk, including
// the current Sentinel state.
func (c *SentinelClient) FlushConfig() *StatusCmd {
cmd := NewStatusCmd("sentinel", "flushconfig")
c.Process(cmd)
return cmd
}

// Master shows the state and info of the specified master.
func (c *SentinelClient) Master(name string) *StringStringMapCmd {
cmd := NewStringStringMapCmd("sentinel", "master", name)
c.Process(cmd)
return cmd
}

type sentinelFailover struct {
sentinelAddrs []string

Expand Down

0 comments on commit 69c8af3

Please sign in to comment.