(params martini.Params)
| 523 | } |
| 524 | |
| 525 | func (s *apiServer) InfoSentinel(params martini.Params) (int, string) { |
| 526 | addr, err := s.parseAddr(params) |
| 527 | if err != nil { |
| 528 | return rpc.ApiResponseError(err) |
| 529 | } |
| 530 | c, err := redis.NewClientNoAuth(addr, time.Second) |
| 531 | if err != nil { |
| 532 | log.WarnErrorf(err, "create redis client to %s failed", addr) |
| 533 | return rpc.ApiResponseError(err) |
| 534 | } |
| 535 | defer c.Close() |
| 536 | if info, err := c.Info(); err != nil { |
| 537 | return rpc.ApiResponseError(err) |
| 538 | } else { |
| 539 | return rpc.ApiResponseJson(info) |
| 540 | } |
| 541 | } |
| 542 | |
| 543 | func (s *apiServer) InfoSentinelMonitored(params martini.Params) (int, string) { |
| 544 | addr, err := s.parseAddr(params) |
nothing calls this directly
no test coverage detected