(params martini.Params)
| 403 | } |
| 404 | |
| 405 | func (s *apiServer) GroupPromoteServer(params martini.Params) (int, string) { |
| 406 | if err := s.verifyXAuth(params); err != nil { |
| 407 | return rpc.ApiResponseError(err) |
| 408 | } |
| 409 | gid, err := s.parseInteger(params, "gid") |
| 410 | if err != nil { |
| 411 | return rpc.ApiResponseError(err) |
| 412 | } |
| 413 | addr, err := s.parseAddr(params) |
| 414 | if err != nil { |
| 415 | return rpc.ApiResponseError(err) |
| 416 | } |
| 417 | if err := s.topom.GroupPromoteServer(gid, addr); err != nil { |
| 418 | return rpc.ApiResponseError(err) |
| 419 | } else { |
| 420 | return rpc.ApiResponseJson("OK") |
| 421 | } |
| 422 | } |
| 423 | |
| 424 | func (s *apiServer) EnableReplicaGroups(params martini.Params) (int, string) { |
| 425 | if err := s.verifyXAuth(params); err != nil { |
nothing calls this directly
no test coverage detected