diff --git a/service/meta.go b/service/meta.go index 52874c1..1e3fcc8 100644 --- a/service/meta.go +++ b/service/meta.go @@ -10,6 +10,7 @@ type ( // MetaHeader contains meta information of request. // It provides methods to get or set meta information meta header. // Also contains methods to reset and restore meta header. + // Also contains methods to get or set request protocol version MetaHeader interface { ResetMeta() RequestMetaHeader RestoreMeta(RequestMetaHeader) @@ -20,7 +21,16 @@ type ( // EpochRequest gives possibility to get or set epoch in RPC Requests. 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. diff --git a/service/meta.proto b/service/meta.proto index 4c09fb3..62866d2 100644 --- a/service/meta.proto +++ b/service/meta.proto @@ -7,6 +7,7 @@ import "github.com/gogo/protobuf/gogoproto/gogo.proto"; option (gogoproto.stable_marshaler_all) = true; message RequestMetaHeader { - uint32 TTL = 1; - uint64 Epoch = 2; + uint32 TTL = 1; + uint64 Epoch = 2; + uint32 Version = 3; }