Add the flushconfig sentinel command

This commit is contained in:
Étienne Michon 2019-02-21 11:28:23 +01:00
parent bd542089bb
commit 3c02e56ed9
No known key found for this signature in database
GPG Key ID: 3D0A46951838A869
1 changed files with 8 additions and 0 deletions

View File

@ -182,6 +182,14 @@ func (c *SentinelClient) Reset(pattern string) *IntCmd {
return cmd 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
}
type sentinelFailover struct { type sentinelFailover struct {
sentinelAddrs []string sentinelAddrs []string