2017-06-16 17:00:49 +08:00
|
|
|
/**
|
|
|
|
* Copyright (C) 2015-2018
|
|
|
|
* All rights reserved.
|
|
|
|
*
|
|
|
|
* AUTHOR(S)
|
|
|
|
* Zheng Shuxin
|
|
|
|
* E-mail: zhengshuxin@qiyi.com
|
|
|
|
*
|
|
|
|
* VERSION
|
|
|
|
* Fri 16 Jun 2017 01:53:06 PM CST
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
struct stat_req_t;
|
|
|
|
struct stat_res_t;
|
|
|
|
struct serv_info_t;
|
2017-09-22 18:05:34 +08:00
|
|
|
class http_client;
|
2017-06-16 17:00:49 +08:00
|
|
|
|
|
|
|
class service_stat
|
|
|
|
{
|
|
|
|
public:
|
2017-09-22 18:05:34 +08:00
|
|
|
service_stat(http_client& client) : client_(client) {}
|
2017-06-16 17:00:49 +08:00
|
|
|
~service_stat(void) {}
|
|
|
|
|
2017-09-22 18:05:34 +08:00
|
|
|
bool run(acl::json& json);
|
2017-06-16 17:00:49 +08:00
|
|
|
private:
|
2017-09-22 18:05:34 +08:00
|
|
|
bool handle(const stat_req_t& req, stat_res_t& res);
|
2017-06-27 17:11:04 +08:00
|
|
|
bool stat_one(const char* path, serv_info_t& info);
|
2017-09-22 18:05:34 +08:00
|
|
|
|
|
|
|
private:
|
|
|
|
http_client& client_;
|
2017-06-16 17:00:49 +08:00
|
|
|
};
|