forked from TrueCloudLab/frostfs-api-go
proto: add version of protocol into meta header
This commit is contained in:
parent
4efb4dafe8
commit
16101b7d84
2 changed files with 14 additions and 3 deletions
|
@ -10,6 +10,7 @@ type (
|
||||||
// MetaHeader contains meta information of request.
|
// MetaHeader contains meta information of request.
|
||||||
// It provides methods to get or set meta information meta header.
|
// It provides methods to get or set meta information meta header.
|
||||||
// Also contains methods to reset and restore meta header.
|
// Also contains methods to reset and restore meta header.
|
||||||
|
// Also contains methods to get or set request protocol version
|
||||||
MetaHeader interface {
|
MetaHeader interface {
|
||||||
ResetMeta() RequestMetaHeader
|
ResetMeta() RequestMetaHeader
|
||||||
RestoreMeta(RequestMetaHeader)
|
RestoreMeta(RequestMetaHeader)
|
||||||
|
@ -20,7 +21,16 @@ type (
|
||||||
|
|
||||||
// EpochRequest gives possibility to get or set epoch in RPC Requests.
|
// EpochRequest gives possibility to get or set epoch in RPC Requests.
|
||||||
GetEpoch() uint64
|
GetEpoch() uint64
|
||||||
SetEpoch(v uint64)
|
SetEpoch(uint64)
|
||||||
|
|
||||||
|
// VersionHeader allows get or set version of protocol request
|
||||||
|
VersionHeader
|
||||||
|
}
|
||||||
|
|
||||||
|
// VersionHeader allows get or set version of protocol request
|
||||||
|
VersionHeader interface {
|
||||||
|
GetVersion() uint32
|
||||||
|
SetVersion(uint32)
|
||||||
}
|
}
|
||||||
|
|
||||||
// TTLCondition is closure, that allows to validate request with ttl.
|
// TTLCondition is closure, that allows to validate request with ttl.
|
||||||
|
|
|
@ -7,6 +7,7 @@ import "github.com/gogo/protobuf/gogoproto/gogo.proto";
|
||||||
option (gogoproto.stable_marshaler_all) = true;
|
option (gogoproto.stable_marshaler_all) = true;
|
||||||
|
|
||||||
message RequestMetaHeader {
|
message RequestMetaHeader {
|
||||||
uint32 TTL = 1;
|
uint32 TTL = 1;
|
||||||
uint64 Epoch = 2;
|
uint64 Epoch = 2;
|
||||||
|
uint32 Version = 3;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue