Skip to content

Commit 61395aa

Browse files
author
James DeFelice
committed
spec: experimental service: ObjectStore.
Mock up of an experimental object storage API. Note the use of the `alpha_service` marker option for the new gRPC service, as well as the additional `alpha_xxx` markers for the new RPCs and top-level request/response messages.
1 parent cc6c138 commit 61395aa

File tree

3 files changed

+1162
-338
lines changed

3 files changed

+1162
-338
lines changed

csi.proto

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,20 @@ service Node {
127127
rpc NodeGetInfo (NodeGetInfoRequest)
128128
returns (NodeGetInfoResponse) {}
129129
}
130+
131+
service ObjectStore {
132+
option (alpha_service) = true;
133+
134+
rpc ObjectStoreRead(ObjectStoreReadRequest)
135+
returns (ObjectStoreReadResponse) {
136+
option (alpha_method) = true;
137+
}
138+
139+
rpc ObjectStoreWrite(ObjectStoreWriteRequest)
140+
returns (ObjectStoreWriteResponse) {
141+
option (alpha_method) = true;
142+
}
143+
}
130144
message GetPluginInfoRequest {
131145
// Intentionally empty.
132146
}
@@ -236,6 +250,9 @@ message PluginCapability {
236250
// Indicates that the plugin supports data lineage reporting for
237251
// volumes.
238252
VOLUME_LINEAGE = 1;
253+
254+
// Indicates that the plugin supports the object storage service.
255+
OBJECT_STORE = 2;
239256
}
240257

241258
Type type = 1; // REQUIRED
@@ -1452,3 +1469,50 @@ message NodeExpandVolumeResponse {
14521469
// The capacity of the volume in bytes. This field is OPTIONAL.
14531470
int64 capacity_bytes = 1;
14541471
}
1472+
message ObjectStoreReadRequest {
1473+
option (alpha_message) = true;
1474+
1475+
message DataSelector {
1476+
message Range {
1477+
int64 offset = 1;
1478+
int64 length = 2;
1479+
}
1480+
1481+
repeated Range range = 1;
1482+
}
1483+
1484+
string location = 1;
1485+
map<string, string> secrets = 2 [(csi_secret) = true];
1486+
1487+
oneof kind {
1488+
bool metadata_only = 3;
1489+
DataSelector selector = 4;
1490+
}
1491+
}
1492+
1493+
message ObjectStoreReadResponse {
1494+
option (alpha_message) = true;
1495+
1496+
message Segment {
1497+
int64 offset = 1;
1498+
bytes value = 2;
1499+
}
1500+
1501+
repeated Segment segments = 1;
1502+
}
1503+
message ObjectStoreWriteRequest {
1504+
option (alpha_message) = true;
1505+
1506+
string location = 1;
1507+
map<string, string> secrets = 2 [(csi_secret) = true];
1508+
1509+
oneof action {
1510+
bytes data_append = 3;
1511+
bytes data_overwrite = 4;
1512+
bool remove = 5;
1513+
}
1514+
}
1515+
1516+
message ObjectStoreWriteResponse {
1517+
option (alpha_message) = true;
1518+
}

0 commit comments

Comments
 (0)