mirror of
https://github.com/go-micro/go-micro.git
synced 2025-06-12 22:07:47 +02:00
Add debug stats handler
This commit is contained in:
@ -6,11 +6,29 @@ syntax = "proto3";
|
||||
//
|
||||
// service Debug {
|
||||
// rpc Health(HealthRequest) returns (HealthResponse) {}
|
||||
// rpc Stats(StatsRequest) returns (StatsResponse) {}
|
||||
// }
|
||||
|
||||
message HealthRequest {
|
||||
}
|
||||
|
||||
message HealthResponse {
|
||||
// default: ok
|
||||
string status = 1;
|
||||
}
|
||||
|
||||
message StatsRequest {
|
||||
}
|
||||
|
||||
message StatsResponse {
|
||||
// unix timestamp
|
||||
uint64 started = 1;
|
||||
// in seconds
|
||||
uint64 uptime = 2;
|
||||
// in bytes
|
||||
uint64 memory = 3;
|
||||
// num threads
|
||||
uint64 threads = 4;
|
||||
// total gc in nanoseconds
|
||||
uint64 gc = 5;
|
||||
}
|
||||
|
Reference in New Issue
Block a user