(params martini.Params)
| 126 | } |
| 127 | |
| 128 | func (s *apiServer) Stats(params martini.Params) (int, string) { |
| 129 | if err := s.verifyXAuth(params); err != nil { |
| 130 | return rpc.ApiResponseError(err) |
| 131 | } else { |
| 132 | var flags StatsFlags |
| 133 | if s := params["flags"]; s != "" { |
| 134 | n, err := strconv.Atoi(s) |
| 135 | if err != nil { |
| 136 | return rpc.ApiResponseError(err) |
| 137 | } |
| 138 | flags = StatsFlags(n) |
| 139 | } |
| 140 | return rpc.ApiResponseJson(s.proxy.Stats(flags)) |
| 141 | } |
| 142 | } |
| 143 | |
| 144 | func (s *apiServer) Slots(params martini.Params) (int, string) { |
| 145 | if err := s.verifyXAuth(params); err != nil { |
no test coverage detected