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

Method CreateProxy

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

Source from the content-addressed store, hash-verified

234}
235
236func (s *apiServer) CreateProxy(params martini.Params) (int, string) {
237 if err := s.verifyXAuth(params); err != nil {
238 return rpc.ApiResponseError(err)
239 }
240 addr, err := s.parseAddr(params)
241 if err != nil {
242 return rpc.ApiResponseError(err)
243 }
244 if err := s.topom.CreateProxy(addr); err != nil {
245 return rpc.ApiResponseError(err)
246 } else {
247 return rpc.ApiResponseJson("OK")
248 }
249}
250
251func (s *apiServer) OnlineProxy(params martini.Params) (int, string) {
252 if err := s.verifyXAuth(params); err != nil {

Callers

nothing calls this directly

Calls 2

verifyXAuthMethod · 0.95
parseAddrMethod · 0.95

Tested by

no test coverage detected