diff options
author | Mateusz Nowotyński <maxmati4@gmail.com> | 2019-11-13 22:04:13 +0300 |
---|---|---|
committer | Mateusz Nowotyński <maxmati4@gmail.com> | 2019-11-18 21:31:21 +0300 |
commit | 8b47ed719adb404e89f6b9aabdf21597dca0c989 (patch) | |
tree | 943f51714b251f67a7d96bca76746f1328ac8946 /proto/server.proto | |
parent | 6a4bb1a83196cea9e499d88fa03b8c2146d8fd13 (diff) |
Add DiskStatistics grpc method to ServerService
DiskStatistics method returns available and used space for each gitaly
storage. Praefect calls all nodes and agregates results from all of
them.
Signed-off-by: Mateusz Nowotyński <maxmati4@gmail.com>
Diffstat (limited to 'proto/server.proto')
-rw-r--r-- | proto/server.proto | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/proto/server.proto b/proto/server.proto index 6774eeae4..68e39f2fe 100644 --- a/proto/server.proto +++ b/proto/server.proto @@ -13,6 +13,12 @@ service ServerService { scope_level: SERVER }; } + rpc DiskStatistics(DiskStatisticsRequest) returns (DiskStatisticsResponse) { + option (op_type) = { + op: ACCESSOR + scope_level: SERVER + }; + } } message ServerInfoRequest {} @@ -30,3 +36,17 @@ message ServerInfoResponse { string git_version = 2; repeated StorageStatus storage_statuses = 3; } + +message DiskStatisticsRequest {} + +message DiskStatisticsResponse { + message StorageStatus { +// When both available and used fields are equal 0 that means that +// Gitaly was unable to determine storage stats. + string storage_name = 1; + int64 available = 2; + int64 used = 3; + } + + repeated StorageStatus storage_statuses = 1; +} |