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

Method AddSentinel

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

Source from the content-addressed store, hash-verified

460}
461
462func (s *apiServer) AddSentinel(params martini.Params) (int, string) {
463 if err := s.verifyXAuth(params); err != nil {
464 return rpc.ApiResponseError(err)
465 }
466 addr, err := s.parseAddr(params)
467 if err != nil {
468 return rpc.ApiResponseError(err)
469 }
470 if err := s.topom.AddSentinel(addr); err != nil {
471 return rpc.ApiResponseError(err)
472 } else {
473 return rpc.ApiResponseJson("OK")
474 }
475}
476
477func (s *apiServer) DelSentinel(params martini.Params) (int, string) {
478 if err := s.verifyXAuth(params); err != nil {

Callers 1

handleSentinelCommandMethod · 0.45

Calls 2

verifyXAuthMethod · 0.95
parseAddrMethod · 0.95

Tested by

no test coverage detected