1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127
|
syntax = "proto3";
package gitaly;
import "google/protobuf/duration.proto";
import "lint.proto";
option go_package = "gitlab.com/gitlab-org/gitaly/v16/proto/go/gitalypb";
// ServerService is a service that provides information about a Gitaly server.
service ServerService {
option (intercepted) = true;
// This comment is left unintentionally blank.
rpc ServerInfo(ServerInfoRequest) returns (ServerInfoResponse);
// This comment is left unintentionally blank.
rpc DiskStatistics(DiskStatisticsRequest) returns (DiskStatisticsResponse);
// ClockSynced checks if machine clock is synced
// (the offset is less that the one passed in the request).
rpc ClockSynced(ClockSyncedRequest) returns (ClockSyncedResponse);
// ReadinessCheck runs the set of the checks to make sure service is in operational state.
rpc ReadinessCheck(ReadinessCheckRequest) returns (ReadinessCheckResponse);
}
// This comment is left unintentionally blank.
message ServerInfoRequest {
}
// This comment is left unintentionally blank.
message ServerInfoResponse {
// This comment is left unintentionally blank.
message StorageStatus {
// This comment is left unintentionally blank.
string storage_name = 1;
// This comment is left unintentionally blank.
bool readable = 2;
// This comment is left unintentionally blank.
bool writeable = 3;
// This comment is left unintentionally blank.
string fs_type = 4;
// This comment is left unintentionally blank.
string filesystem_id = 5;
// This comment is left unintentionally blank.
uint32 replication_factor = 6;
}
// This comment is left unintentionally blank.
string server_version = 1;
// This comment is left unintentionally blank.
string git_version = 2;
// This comment is left unintentionally blank.
repeated StorageStatus storage_statuses = 3;
}
// This comment is left unintentionally blank.
message DiskStatisticsRequest {
}
// This comment is left unintentionally blank.
message DiskStatisticsResponse {
// This comment is left unintentionally blank.
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;
// This comment is left unintentionally blank.
int64 available = 2;
// This comment is left unintentionally blank.
int64 used = 3;
}
// This comment is left unintentionally blank.
repeated StorageStatus storage_statuses = 1;
}
// ClockSyncedRequest contains settings to be used for the system clock synchronisation check.
message ClockSyncedRequest {
// NtpHost is a URL to the external NTP service that should be used for clock sync check.
// Default is "pool.ntp.org"
string ntp_host = 1;
reserved "drift_threshold_millis";
reserved 2;
// DriftThreshold is an allowed drift from the NTP service.
google.protobuf.Duration drift_threshold = 3;
}
// ClockSyncedRequest represents result of the system clock synchronisation check.
message ClockSyncedResponse {
// Synced is set to true if system clock has an affordable drift compared to NTP service.
bool synced = 1;
}
// ReadinessCheckRequest is used to verify if the service is in operational state.
message ReadinessCheckRequest {
// Timeout is an amount of milliseconds for the check to run before give up and mark as failed.
google.protobuf.Duration timeout = 1;
}
// ReadinessCheckResponse is just a stub now and contains no information.
// If the service is not in the operational state the error will be returned instead.
message ReadinessCheckResponse {
// Ok represents response if none checks failed.
message Ok {
}
// Failure represents response if at least one check failed.
message Failure {
// Response contains information about failed check.
message Response {
// Name is a name of the check that was performed.
string name = 1;
// ErrorMessage is a cause of the check failure.
string error_message = 2;
}
// FailedChecks is a list of failed checks.
repeated Response failed_checks = 1;
}
oneof Result {
// OkResponse is set when all checks pass.
Ok ok_response = 1;
// FailureResponse is set if at least one check failed.
Failure failure_response = 2;
}
}
|