github.com/rancher/longhorn-engine@v0.6.2/replica/rpc/replica.proto (about) 1 syntax="proto3"; 2 3 import "google/protobuf/empty.proto"; 4 5 package rpc; 6 7 service ReplicaService { 8 rpc ReplicaCreate(ReplicaCreateRequest) returns (Replica) {} 9 rpc ReplicaDelete(google.protobuf.Empty) returns (google.protobuf.Empty) {} 10 rpc ReplicaGet(google.protobuf.Empty) returns (Replica) {} 11 rpc ReplicaOpen(google.protobuf.Empty) returns (Replica) {} 12 rpc ReplicaClose(google.protobuf.Empty) returns (Replica) {} 13 rpc ReplicaReload(google.protobuf.Empty) returns (Replica) {} 14 rpc ReplicaRevert(ReplicaRevertRequest) returns (Replica) {} 15 rpc ReplicaSnapshot(ReplicaSnapshotRequest) returns (Replica) {} 16 rpc DiskRemove(DiskRemoveRequest) returns (Replica) {} 17 rpc DiskReplace(DiskReplaceRequest) returns (Replica) {} 18 rpc DiskPrepareRemove(DiskPrepareRemoveRequest) returns (DiskPrepareRemoveReply) {} 19 rpc DiskMarkAsRemoved(DiskMarkAsRemovedRequest) returns (Replica) {} 20 rpc RebuildingSet(RebuildingSetRequest) returns (Replica) {} 21 rpc RevisionCounterSet(RevisionCounterSetRequest) returns (Replica) {} 22 } 23 24 message ReplicaCreateRequest { 25 string size = 1; 26 } 27 28 message ReplicaRevertRequest { 29 string name = 1; 30 string created = 2; 31 } 32 33 message ReplicaSnapshotRequest { 34 string name = 1; 35 bool userCreated = 2; 36 string created = 3; 37 map<string, string> labels = 4; 38 } 39 40 message DiskRemoveRequest { 41 string name = 1; 42 bool force = 2; 43 } 44 45 message DiskReplaceRequest { 46 string target = 1; 47 string source = 2; 48 } 49 50 message DiskPrepareRemoveRequest { 51 string name = 1; 52 } 53 54 message DiskPrepareRemoveReply { 55 repeated PrepareRemoveAction operations = 1; 56 } 57 58 message DiskMarkAsRemovedRequest { 59 string name = 1; 60 } 61 62 message RebuildingSetRequest { 63 bool rebuilding = 1; 64 } 65 66 message RevisionCounterSetRequest { 67 int64 counter = 1; 68 } 69 70 message DiskInfo { 71 string name = 1; 72 string parent = 2; 73 map<string, bool> children = 3; 74 bool removed = 4; 75 bool userCreated = 5; 76 string created = 6; 77 string size = 7; 78 map<string, string> labels = 8; 79 } 80 81 message Replica { 82 bool dirty = 1; 83 bool rebuilding = 2; 84 string head = 3; 85 string parent = 4; 86 string size = 5; 87 int64 sectorSize = 6; 88 string backingFile = 7; 89 string state = 8; 90 repeated string chain = 9; 91 map<string, DiskInfo> disks = 10; 92 int32 remainSnapshots = 11; 93 int64 revisionCounter = 12; 94 } 95 96 message PrepareRemoveAction { 97 string action = 1; 98 string source = 2; 99 string target = 3; 100 }