| 589 | } |
| 590 | |
| 591 | void Register(google::protobuf::RpcController* cntl_base, |
| 592 | const test::HttpRequest*, |
| 593 | test::HttpResponse*, |
| 594 | google::protobuf::Closure* done) { |
| 595 | brpc::ClosureGuard done_guard(done); |
| 596 | brpc::Controller* cntl = static_cast<brpc::Controller*>(cntl_base); |
| 597 | auto body = cntl->request_attachment().to_string(); |
| 598 | for (brpc::QuerySplitter sp(body); sp; ++sp) { |
| 599 | if (sp.key() == "addrs") { |
| 600 | _addrs.insert(sp.value().as_string()); |
| 601 | } |
| 602 | } |
| 603 | cntl->response_attachment().append(R"({ |
| 604 | "code": 0, |
| 605 | "message": "0" |
| 606 | })"); |
| 607 | return; |
| 608 | } |
| 609 | |
| 610 | void Renew(google::protobuf::RpcController* cntl_base, |
| 611 | const test::HttpRequest*, |