seaweedfs/weed/pb/volume_server.proto

194 lines
4.3 KiB
Protocol Buffer
Raw Normal View History

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) {
}
rpc DeleteCollection (DeleteCollectionRequest) returns (DeleteCollectionResponse) {
}
2019-04-11 04:41:17 +00:00
rpc AllocateVolume (AllocateVolumeRequest) returns (AllocateVolumeResponse) {
}
2018-10-16 04:44:41 +00:00
rpc VolumeSyncStatus (VolumeSyncStatusRequest) returns (VolumeSyncStatusResponse) {
}
2019-04-18 05:04:49 +00:00
rpc VolumeIncrementalCopy (VolumeIncrementalCopyRequest) returns (stream VolumeIncrementalCopyResponse) {
2019-03-25 16:16:12 +00:00
}
rpc VolumeMount (VolumeMountRequest) returns (VolumeMountResponse) {
}
rpc VolumeUnmount (VolumeUnmountRequest) returns (VolumeUnmountResponse) {
}
rpc VolumeDelete (VolumeDeleteRequest) returns (VolumeDeleteResponse) {
}
2019-04-18 05:04:49 +00:00
// copy the .idx .dat files, and mount this volume
rpc VolumeCopy (VolumeCopyRequest) returns (VolumeCopyResponse) {
}
rpc ReadVolumeFileStatus (ReadVolumeFileStatusRequest) returns (ReadVolumeFileStatusResponse) {
}
rpc CopyFile (CopyFileRequest) returns (stream CopyFileResponse) {
}
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 volume_id = 1;
2018-10-15 06:12:43 +00:00
}
message VacuumVolumeCheckResponse {
double garbage_ratio = 1;
}
message VacuumVolumeCompactRequest {
uint32 volume_id = 1;
2018-10-15 06:12:43 +00:00
int64 preallocate = 2;
}
message VacuumVolumeCompactResponse {
}
message VacuumVolumeCommitRequest {
uint32 volume_id = 1;
2018-10-15 06:12:43 +00:00
}
message VacuumVolumeCommitResponse {
}
message VacuumVolumeCleanupRequest {
uint32 volume_id = 1;
2018-10-15 06:12:43 +00:00
}
message VacuumVolumeCleanupResponse {
}
message DeleteCollectionRequest {
string collection = 1;
}
message DeleteCollectionResponse {
}
2019-04-11 04:41:17 +00:00
message AllocateVolumeRequest {
uint32 volume_id = 1;
string collection = 2;
int64 preallocate = 3;
string replication = 4;
string ttl = 5;
}
2019-04-11 04:41:17 +00:00
message AllocateVolumeResponse {
}
message VolumeSyncStatusRequest {
uint32 volume_id = 1;
}
message VolumeSyncStatusResponse {
uint32 volume_id = 1;
string collection = 2;
string replication = 4;
string ttl = 5;
uint64 tail_offset = 6;
uint32 compact_revision = 7;
uint64 idx_file_size = 8;
}
2019-04-18 05:04:49 +00:00
message VolumeIncrementalCopyRequest {
2019-03-25 16:16:12 +00:00
uint32 volume_id = 1;
uint64 since = 2;
}
2019-04-18 05:04:49 +00:00
message VolumeIncrementalCopyResponse {
2019-03-25 16:16:12 +00:00
bytes file_content = 1;
}
message VolumeMountRequest {
uint32 volume_id = 1;
}
message VolumeMountResponse {
}
message VolumeUnmountRequest {
uint32 volume_id = 1;
}
message VolumeUnmountResponse {
}
message VolumeDeleteRequest {
uint32 volume_id = 1;
}
message VolumeDeleteResponse {
}
2019-04-18 05:04:49 +00:00
message VolumeCopyRequest {
uint32 volume_id = 1;
string collection = 2;
string replication = 3;
string ttl = 4;
string source_data_node = 5;
}
2019-04-18 05:04:49 +00:00
message VolumeCopyResponse {
}
message CopyFileRequest {
uint32 volume_id = 1;
bool is_idx_file = 2;
bool is_dat_file = 3;
}
message CopyFileResponse {
bytes file_content = 1;
}
message ReadVolumeFileStatusRequest {
uint32 volume_id = 1;
}
message ReadVolumeFileStatusResponse {
uint32 volume_id = 1;
uint64 idx_file_timestamp = 2;
uint64 idx_file_size = 3;
uint64 dat_file_timestamp = 4;
uint64 dat_file_size = 5;
uint64 file_count = 6;
}
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;
}