(method string)
| 69 | } |
| 70 | |
| 71 | func (this *CliRpcServer) GetHandler(method string) func(req *common.CliRpcRequest, resp *common.CliRpcResponse) { |
| 72 | handler, ok := this.handlers[method] |
| 73 | if !ok { |
| 74 | return nil |
| 75 | } |
| 76 | return handler |
| 77 | } |
| 78 | |
| 79 | func (this *CliRpcServer) Handler(w http.ResponseWriter, r *http.Request) { |
| 80 | resp := &common.CliRpcResponse{} |