Merge pull request #982 from EtienneM/fix/sentinel_commands

Add a couple of sentinel commands
This commit is contained in:
Vladimir Mihailenco 2019-03-01 11:23:49 +02:00 committed by GitHub
commit 69c8af34df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 15 additions and 0 deletions

View File

@ -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