mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
API: Support server/pid/service label for exporter and api. (#3385)
* Exporter: Support server/pid/service.(#3378) * API: Support return server/pid/service.(#3378) * Use 8-length service id. * Update release v5.0.135 v6.0.16 Co-authored-by: winlin <winlin@vip.126.com> Co-authored-by: Haibo Chen <495810242@qq.com>
This commit is contained in:
parent
39c2b9c497
commit
02653ce2aa
8 changed files with 68 additions and 3 deletions
|
@ -128,6 +128,10 @@ private:
|
|||
static SrsStatistic *_instance;
|
||||
// The id to identify the sever.
|
||||
std::string server_id_;
|
||||
// The id to identify the service.
|
||||
std::string service_id_;
|
||||
// The pid to identify the service process.
|
||||
std::string service_pid_;
|
||||
private:
|
||||
// The key: vhost id, value: vhost object.
|
||||
std::map<std::string, SrsStatisticVhost*> vhosts;
|
||||
|
@ -201,6 +205,10 @@ public:
|
|||
// Get the server id, used to identify the server.
|
||||
// For example, when restart, the server id must changed.
|
||||
virtual std::string server_id();
|
||||
// Get the service id, used to identify the restart of service.
|
||||
virtual std::string service_id();
|
||||
// Get the service pid, used to identify the service process.
|
||||
virtual std::string service_pid();
|
||||
// Dumps the vhosts to amf0 array.
|
||||
virtual srs_error_t dumps_vhosts(SrsJsonArray* arr);
|
||||
// Dumps the streams to amf0 array.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue