From 3c02e56ed99705bfe0d591806289e0a68988390e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89tienne=20Michon?= Date: Thu, 21 Feb 2019 11:28:23 +0100 Subject: [PATCH] Add the flushconfig sentinel command --- sentinel.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sentinel.go b/sentinel.go index 7cbb90bd..09ca98f0 100644 --- a/sentinel.go +++ b/sentinel.go @@ -182,6 +182,14 @@ 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 +} + type sentinelFailover struct { sentinelAddrs []string