MCPcopy Index your code
hub / github.com/CodisLabs/codis / InfoSentinelMonitored

Method InfoSentinelMonitored

pkg/topom/topom_api.go:543–554  ·  view source on GitHub ↗
(params martini.Params)

Source from the content-addressed store, hash-verified

541}
542
543func (s *apiServer) InfoSentinelMonitored(params martini.Params) (int, string) {
544 addr, err := s.parseAddr(params)
545 if err != nil {
546 return rpc.ApiResponseError(err)
547 }
548 sentinel := redis.NewSentinel(s.topom.Config().ProductName, s.topom.Config().ProductAuth)
549 if info, err := sentinel.MastersAndSlaves(addr, s.topom.Config().SentinelClientTimeout.Duration()); err != nil {
550 return rpc.ApiResponseError(err)
551 } else {
552 return rpc.ApiResponseJson(info)
553 }
554}
555
556func (s *apiServer) SyncCreateAction(params martini.Params) (int, string) {
557 if err := s.verifyXAuth(params); err != nil {

Callers

nothing calls this directly

Calls 4

parseAddrMethod · 0.95
MastersAndSlavesMethod · 0.95
DurationMethod · 0.80
ConfigMethod · 0.45

Tested by

no test coverage detected