diff --git a/docs/object.md b/docs/object.md index d13b6768..ce9252bc 100644 --- a/docs/object.md +++ b/docs/object.md @@ -161,6 +161,10 @@ DeleteResponse is empty because we cannot guarantee permanent object removal in distributed system. +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| Meta | [service.ResponseMetaHeader](#service.ResponseMetaHeader) | | ResponseMetaHeader contains meta information based on request processing by server (should be embedded into message) | + @@ -186,6 +190,7 @@ in distributed system. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | Hashes | [bytes](#bytes) | repeated | Hashes is a homomorphic hashes of all ranges | +| Meta | [service.ResponseMetaHeader](#service.ResponseMetaHeader) | | ResponseMetaHeader contains meta information based on request processing by server (should be embedded into message) | @@ -211,6 +216,7 @@ in distributed system. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | Fragment | [bytes](#bytes) | | Fragment of object's payload | +| Meta | [service.ResponseMetaHeader](#service.ResponseMetaHeader) | | ResponseMetaHeader contains meta information based on request processing by server (should be embedded into message) | @@ -237,6 +243,7 @@ in distributed system. | ----- | ---- | ----- | ----------- | | object | [Object](#object.Object) | | Object header and some payload | | Chunk | [bytes](#bytes) | | Chunk of remaining payload | +| Meta | [service.ResponseMetaHeader](#service.ResponseMetaHeader) | | ResponseMetaHeader contains meta information based on request processing by server (should be embedded into message) | @@ -263,6 +270,7 @@ in distributed system. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | Object | [Object](#object.Object) | | Object without payload | +| Meta | [service.ResponseMetaHeader](#service.ResponseMetaHeader) | | ResponseMetaHeader contains meta information based on request processing by server (should be embedded into message) | @@ -300,6 +308,7 @@ in distributed system. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | Address | [refs.Address](#refs.Address) | | Address of object (container id + object id) | +| Meta | [service.ResponseMetaHeader](#service.ResponseMetaHeader) | | ResponseMetaHeader contains meta information based on request processing by server (should be embedded into message) | @@ -326,6 +335,7 @@ in distributed system. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | Addresses | [refs.Address](#refs.Address) | repeated | Addresses of found objects | +| Meta | [service.ResponseMetaHeader](#service.ResponseMetaHeader) | | ResponseMetaHeader contains meta information based on request processing by server (should be embedded into message) | diff --git a/docs/service.md b/docs/service.md index 454fab42..90e1bd2b 100644 --- a/docs/service.md +++ b/docs/service.md @@ -7,6 +7,7 @@ - Messages - [RequestMetaHeader](#service.RequestMetaHeader) + - [ResponseMetaHeader](#service.ResponseMetaHeader) - [service/verify.proto](#service/verify.proto) @@ -49,6 +50,19 @@ RequestMetaHeader contains information about request meta headers | Epoch | [uint64](#uint64) | | Epoch for user can be empty, because node sets epoch to the actual value | | Version | [uint32](#uint32) | | Version defines protocol version TODO: not used for now, should be implemented in future | + + + +### Message ResponseMetaHeader +ResponseMetaHeader contains meta information based on request processing by server +(should be embedded into message) + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| Epoch | [uint64](#uint64) | | Current NeoFS epoch on server | +| Version | [uint32](#uint32) | | Version defines protocol version TODO: not used for now, should be implemented in future | + diff --git a/object/service.pb.go b/object/service.pb.go index 1ecf6d9b..46891e2f 100644 Binary files a/object/service.pb.go and b/object/service.pb.go differ diff --git a/object/service.proto b/object/service.proto index f208472c..dbd2a809 100644 --- a/object/service.proto +++ b/object/service.proto @@ -73,6 +73,9 @@ message GetResponse { // Chunk of remaining payload bytes Chunk = 2; } + + // ResponseMetaHeader contains meta information based on request processing by server (should be embedded into message) + service.ResponseMetaHeader Meta = 99 [(gogoproto.embed) = true, (gogoproto.nullable) = false]; } message PutRequest { @@ -99,6 +102,8 @@ message PutRequest { message PutResponse { // Address of object (container id + object id) refs.Address Address = 1 [(gogoproto.nullable) = false]; + // ResponseMetaHeader contains meta information based on request processing by server (should be embedded into message) + service.ResponseMetaHeader Meta = 99 [(gogoproto.embed) = true, (gogoproto.nullable) = false]; } message DeleteRequest { // Address of object (container id + object id) @@ -115,7 +120,10 @@ message DeleteRequest { // DeleteResponse is empty because we cannot guarantee permanent object removal // in distributed system. -message DeleteResponse {} +message DeleteResponse { + // ResponseMetaHeader contains meta information based on request processing by server (should be embedded into message) + service.ResponseMetaHeader Meta = 99 [(gogoproto.embed) = true, (gogoproto.nullable) = false]; +} message HeadRequest { // Address of object (container id + object id) @@ -132,6 +140,8 @@ message HeadRequest { message HeadResponse { // Object without payload Object Object = 1; + // ResponseMetaHeader contains meta information based on request processing by server (should be embedded into message) + service.ResponseMetaHeader Meta = 99 [(gogoproto.embed) = true, (gogoproto.nullable) = false]; } message SearchRequest { @@ -150,6 +160,8 @@ message SearchRequest { message SearchResponse { // Addresses of found objects repeated refs.Address Addresses = 1 [(gogoproto.nullable) = false]; + // ResponseMetaHeader contains meta information based on request processing by server (should be embedded into message) + service.ResponseMetaHeader Meta = 99 [(gogoproto.embed) = true, (gogoproto.nullable) = false]; } message GetRangeRequest { @@ -166,6 +178,8 @@ message GetRangeRequest { message GetRangeResponse { // Fragment of object's payload bytes Fragment = 1; + // ResponseMetaHeader contains meta information based on request processing by server (should be embedded into message) + service.ResponseMetaHeader Meta = 99 [(gogoproto.embed) = true, (gogoproto.nullable) = false]; } message GetRangeHashRequest { @@ -184,5 +198,7 @@ message GetRangeHashRequest { message GetRangeHashResponse { // Hashes is a homomorphic hashes of all ranges repeated bytes Hashes = 1 [(gogoproto.customtype) = "Hash", (gogoproto.nullable) = false]; + // ResponseMetaHeader contains meta information based on request processing by server (should be embedded into message) + service.ResponseMetaHeader Meta = 99 [(gogoproto.embed) = true, (gogoproto.nullable) = false]; } diff --git a/service/meta.pb.go b/service/meta.pb.go index 9b2f430e..b4769e22 100644 Binary files a/service/meta.pb.go and b/service/meta.pb.go differ diff --git a/service/meta.proto b/service/meta.proto index 5ca3633d..97017c9d 100644 --- a/service/meta.proto +++ b/service/meta.proto @@ -18,3 +18,13 @@ message RequestMetaHeader { // TODO: not used for now, should be implemented in future uint32 Version = 3; } + +// ResponseMetaHeader contains meta information based on request processing by server +// (should be embedded into message) +message ResponseMetaHeader { + // Current NeoFS epoch on server + uint64 Epoch = 1; + // Version defines protocol version + // TODO: not used for now, should be implemented in future + uint32 Version = 2; +}