File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -195,6 +195,30 @@ func (c *SentinelClient) Master(name string) *StringStringMapCmd {
195
195
return cmd
196
196
}
197
197
198
+ // Masters shows a list of monitored masters and their state.
199
+ func (c * SentinelClient ) Masters () * SliceCmd {
200
+ cmd := NewSliceCmd ("sentinel" , "masters" )
201
+ c .Process (cmd )
202
+ return cmd
203
+ }
204
+
205
+ // Slaves shows a list of slaves for the specified master and their state.
206
+ func (c * SentinelClient ) Slaves (name string ) * SliceCmd {
207
+ cmd := NewSliceCmd ("sentinel" , "slaves" , name )
208
+ c .Process (cmd )
209
+ return cmd
210
+ }
211
+
212
+ // CkQuorum checks if the current Sentinel configuration is able to reach the
213
+ // quorum needed to failover a master, and the majority needed to authorize the
214
+ // failover. This command should be used in monitoring systems to check if a
215
+ // Sentinel deployment is ok.
216
+ func (c * SentinelClient ) CkQuorum (name string ) * StringCmd {
217
+ cmd := NewStringCmd ("sentinel" , "ckquorum" , name )
218
+ c .Process (cmd )
219
+ return cmd
220
+ }
221
+
198
222
type sentinelFailover struct {
199
223
sentinelAddrs []string
200
224
You can’t perform that action at this time.
0 commit comments