(params martini.Params)
| 505 | } |
| 506 | |
| 507 | func (s *apiServer) InfoServer(params martini.Params) (int, string) { |
| 508 | addr, err := s.parseAddr(params) |
| 509 | if err != nil { |
| 510 | return rpc.ApiResponseError(err) |
| 511 | } |
| 512 | c, err := redis.NewClient(addr, s.topom.Config().ProductAuth, time.Second) |
| 513 | if err != nil { |
| 514 | log.WarnErrorf(err, "create redis client to %s failed", addr) |
| 515 | return rpc.ApiResponseError(err) |
| 516 | } |
| 517 | defer c.Close() |
| 518 | if info, err := c.InfoFull(); err != nil { |
| 519 | return rpc.ApiResponseError(err) |
| 520 | } else { |
| 521 | return rpc.ApiResponseJson(info) |
| 522 | } |
| 523 | } |
| 524 | |
| 525 | func (s *apiServer) InfoSentinel(params martini.Params) (int, string) { |
| 526 | addr, err := s.parseAddr(params) |
nothing calls this directly
no test coverage detected