2018-10-11 08:16:33 +00:00
|
|
|
syntax = "proto3";
|
|
|
|
|
|
|
|
package volume_server_pb;
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////
|
|
|
|
|
|
|
|
service VolumeServer {
|
|
|
|
//Experts only: takes multiple fid parameters. This function does not propagate deletes to replicas.
|
|
|
|
rpc BatchDelete (BatchDeleteRequest) returns (BatchDeleteResponse) {
|
|
|
|
}
|
2018-10-15 06:12:43 +00:00
|
|
|
rpc VacuumVolumeCheck (VacuumVolumeCheckRequest) returns (VacuumVolumeCheckResponse) {
|
|
|
|
}
|
|
|
|
rpc VacuumVolumeCompact (VacuumVolumeCompactRequest) returns (VacuumVolumeCompactResponse) {
|
|
|
|
}
|
|
|
|
rpc VacuumVolumeCommit (VacuumVolumeCommitRequest) returns (VacuumVolumeCommitResponse) {
|
|
|
|
}
|
|
|
|
rpc VacuumVolumeCleanup (VacuumVolumeCleanupRequest) returns (VacuumVolumeCleanupResponse) {
|
|
|
|
}
|
2018-10-15 07:40:46 +00:00
|
|
|
|
2018-10-15 07:03:55 +00:00
|
|
|
rpc DeleteCollection (DeleteCollectionRequest) returns (DeleteCollectionResponse) {
|
|
|
|
}
|
2018-10-15 07:40:46 +00:00
|
|
|
rpc AssignVolume (AssignVolumeRequest) returns (AssignVolumeResponse) {
|
|
|
|
}
|
2018-10-16 04:44:41 +00:00
|
|
|
|
2018-10-15 08:19:15 +00:00
|
|
|
rpc VolumeSyncStatus (VolumeSyncStatusRequest) returns (VolumeSyncStatusResponse) {
|
|
|
|
}
|
2018-12-22 19:10:08 +00:00
|
|
|
rpc VolumeSyncIndex (VolumeSyncIndexRequest) returns (stream VolumeSyncIndexResponse) {
|
2018-10-16 04:44:41 +00:00
|
|
|
}
|
2018-12-22 19:10:08 +00:00
|
|
|
rpc VolumeSyncData (VolumeSyncDataRequest) returns (stream VolumeSyncDataResponse) {
|
2018-10-16 04:44:41 +00:00
|
|
|
}
|
2018-10-15 08:48:15 +00:00
|
|
|
|
|
|
|
rpc VolumeMount (VolumeMountRequest) returns (VolumeMountResponse) {
|
|
|
|
}
|
|
|
|
rpc VolumeUnmount (VolumeUnmountRequest) returns (VolumeUnmountResponse) {
|
|
|
|
}
|
|
|
|
|
2018-10-16 05:25:28 +00:00
|
|
|
// rpc VolumeUiPage (VolumeUiPageRequest) returns (VolumeUiPageResponse) {}
|
|
|
|
|
2018-10-11 08:16:33 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////
|
|
|
|
|
|
|
|
message BatchDeleteRequest {
|
|
|
|
repeated string file_ids = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message BatchDeleteResponse {
|
|
|
|
repeated DeleteResult results = 1;
|
|
|
|
}
|
|
|
|
message DeleteResult {
|
|
|
|
string file_id = 1;
|
|
|
|
int32 status = 2;
|
|
|
|
string error = 3;
|
|
|
|
uint32 size = 4;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Empty {
|
|
|
|
}
|
2018-10-15 06:12:43 +00:00
|
|
|
|
|
|
|
message VacuumVolumeCheckRequest {
|
|
|
|
uint32 volumd_id = 1;
|
|
|
|
}
|
|
|
|
message VacuumVolumeCheckResponse {
|
|
|
|
double garbage_ratio = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message VacuumVolumeCompactRequest {
|
|
|
|
uint32 volumd_id = 1;
|
|
|
|
int64 preallocate = 2;
|
|
|
|
}
|
|
|
|
message VacuumVolumeCompactResponse {
|
|
|
|
}
|
|
|
|
|
|
|
|
message VacuumVolumeCommitRequest {
|
|
|
|
uint32 volumd_id = 1;
|
|
|
|
}
|
|
|
|
message VacuumVolumeCommitResponse {
|
|
|
|
}
|
|
|
|
|
|
|
|
message VacuumVolumeCleanupRequest {
|
|
|
|
uint32 volumd_id = 1;
|
|
|
|
}
|
|
|
|
message VacuumVolumeCleanupResponse {
|
|
|
|
}
|
2018-10-15 07:03:55 +00:00
|
|
|
|
|
|
|
message DeleteCollectionRequest {
|
|
|
|
string collection = 1;
|
|
|
|
}
|
|
|
|
message DeleteCollectionResponse {
|
|
|
|
}
|
2018-10-15 07:40:46 +00:00
|
|
|
|
|
|
|
message AssignVolumeRequest {
|
|
|
|
uint32 volumd_id = 1;
|
|
|
|
string collection = 2;
|
|
|
|
int64 preallocate = 3;
|
|
|
|
string replication = 4;
|
|
|
|
string ttl = 5;
|
|
|
|
}
|
|
|
|
message AssignVolumeResponse {
|
|
|
|
}
|
2018-10-15 08:19:15 +00:00
|
|
|
|
|
|
|
message VolumeSyncStatusRequest {
|
|
|
|
uint32 volumd_id = 1;
|
|
|
|
}
|
|
|
|
message VolumeSyncStatusResponse {
|
|
|
|
uint32 volumd_id = 1;
|
2018-12-22 19:10:08 +00:00
|
|
|
string collection = 2;
|
2018-10-15 08:19:15 +00:00
|
|
|
string replication = 4;
|
|
|
|
string ttl = 5;
|
|
|
|
uint64 tail_offset = 6;
|
|
|
|
uint32 compact_revision = 7;
|
|
|
|
uint64 idx_file_size = 8;
|
|
|
|
}
|
2018-10-15 08:48:15 +00:00
|
|
|
|
2018-10-16 04:44:41 +00:00
|
|
|
message VolumeSyncIndexRequest {
|
|
|
|
uint32 volumd_id = 1;
|
|
|
|
}
|
|
|
|
message VolumeSyncIndexResponse {
|
|
|
|
bytes index_file_content = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message VolumeSyncDataRequest {
|
|
|
|
uint32 volumd_id = 1;
|
|
|
|
uint32 revision = 2;
|
|
|
|
uint32 offset = 3;
|
|
|
|
uint32 size = 4;
|
|
|
|
string needle_id = 5;
|
|
|
|
}
|
|
|
|
message VolumeSyncDataResponse {
|
|
|
|
bytes file_content = 1;
|
|
|
|
}
|
|
|
|
|
2018-10-15 08:48:15 +00:00
|
|
|
message VolumeMountRequest {
|
|
|
|
uint32 volumd_id = 1;
|
|
|
|
}
|
|
|
|
message VolumeMountResponse {
|
|
|
|
}
|
|
|
|
|
|
|
|
message VolumeUnmountRequest {
|
|
|
|
uint32 volumd_id = 1;
|
|
|
|
}
|
|
|
|
message VolumeUnmountResponse {
|
|
|
|
}
|
2018-10-16 05:25:28 +00:00
|
|
|
|
|
|
|
message VolumeUiPageRequest {
|
|
|
|
}
|
|
|
|
message VolumeUiPageResponse {
|
|
|
|
}
|
|
|
|
|
|
|
|
message DiskStatus {
|
|
|
|
string dir = 1;
|
|
|
|
uint64 all = 2;
|
|
|
|
uint64 used = 3;
|
|
|
|
uint64 free = 4;
|
|
|
|
}
|
|
|
|
|
|
|
|
message MemStatus {
|
|
|
|
int32 goroutines = 1;
|
|
|
|
uint64 all = 2;
|
|
|
|
uint64 used = 3;
|
|
|
|
uint64 free = 4;
|
|
|
|
uint64 self = 5;
|
|
|
|
uint64 heap = 6;
|
|
|
|
uint64 stack = 7;
|
|
|
|
}
|