gitee.com/liuxuezhan/go-micro-v1.18.0@v1.0.0/debug/service/proto/debug.proto (about)

     1  syntax = "proto3";
     2  
     3  service Debug {
     4          rpc Health(HealthRequest) returns (HealthResponse) {};
     5          rpc Stats(StatsRequest) returns (StatsResponse) {};
     6          rpc Log(LogRequest) returns (stream Record) {};
     7  }
     8  
     9  message HealthRequest {
    10  	// optional service name
    11  	string service = 1;
    12  }
    13  
    14  message HealthResponse {
    15  	// default: ok
    16  	string status = 1;
    17  }
    18  
    19  message StatsRequest {
    20  	// optional service name
    21  	string service = 1;
    22  }
    23  
    24  message StatsResponse {
    25  	// timestamp of recording
    26  	uint64 timestamp = 1;
    27  	// unix timestamp
    28  	uint64 started = 2;
    29  	// in seconds
    30  	uint64 uptime = 3;
    31  	// in bytes
    32  	uint64 memory = 4;
    33  	// num threads
    34  	uint64 threads = 5;
    35  	// total gc in nanoseconds
    36  	uint64 gc = 6;
    37  }
    38  
    39  // LogRequest requests service logs
    40  message LogRequest {
    41  	// service to request logs for
    42  	string service = 1;
    43  	// stream records continuously
    44  	bool stream = 2;
    45  	// count of records to request
    46  	int64 count = 3;
    47  	// relative time in seconds
    48  	// before the current time
    49  	// from which to show logs
    50  	int64 since = 4;
    51  }
    52  
    53  // Record is service log record
    54  message Record {
    55          // timestamp of log record
    56          int64 timestamp = 1;
    57          // record value
    58          string value = 2;
    59          // record metadata
    60          map<string,string> metadata = 3;
    61  }