Skip to content

Commit

Permalink
[nspcc-dev#194] object: Define payload format of LOCK objects
Browse files Browse the repository at this point in the history
Define `object.Lock` message which carries list of locked objects.
Require this message to be a payload of locked objects (`LOCK` type).

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
  • Loading branch information
Leonard Lyubich committed Feb 16, 2022
1 parent 49d69ff commit 3be7f66
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions object/types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,14 @@ message Header {
// Object structure. Object is immutable and content-addressed. It means
// `ObjectID` will change if header or payload changes. It's calculated as a
// hash of header field, which contains hash of object's payload.
//
// Payload format depends on object type specified in the header:
// * **LOCK** \
// Must be encoded message of type `Lock` in Protocol Buffers binary format
// with direct field order. Member list must no be empty or carry empty IDs.
// All members must regular objects (`REGULAR` type). Lifetime of the lock
// object is limited similar to regular objects in `__NEOFS__EXPIRATION_EPOCH`
// attribute.
message Object {
// Object's unique identifier.
neo.fs.v2.refs.ObjectID object_id = 1 [json_name = "objectID"];
Expand Down Expand Up @@ -208,3 +216,9 @@ message SplitInfo {
// object parts.
neo.fs.v2.refs.ObjectID link = 3;
}

// Lock keeps record of objects that are locked.
message Lock {
// List of objects to be locked.
repeated neo.fs.v2.refs.ObjectID members = 1 [json_name = "members"];
}

0 comments on commit 3be7f66

Please sign in to comment.