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

Method GroupPromoteServer

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

Source from the content-addressed store, hash-verified

403}
404
405func (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
424func (s *apiServer) EnableReplicaGroups(params martini.Params) (int, string) {
425 if err := s.verifyXAuth(params); err != nil {

Callers

nothing calls this directly

Calls 3

verifyXAuthMethod · 0.95
parseIntegerMethod · 0.95
parseAddrMethod · 0.95

Tested by

no test coverage detected