diff options
author | Robert Hensing <roberth@users.noreply.github.com> | 2023-10-20 15:34:26 +0200 |
---|---|---|
committer | eldritch horrors <pennae@lix.systems> | 2024-03-04 04:43:35 +0100 |
commit | ab40b2c5d0f90d6a119bf4b368f933f5331b0c15 (patch) | |
tree | 305c600d732546077701abefc9dddecdd2eadf0f /src/libstore/serve-protocol.hh | |
parent | 5ddd1a916667ec0d969f99a0a85a2092bf18b632 (diff) |
Merge pull request #9157 from obsidiansystems/protocol-versions
Add protocol versions to `{Worker,Serve}Proto::*Conn`
(cherry picked from commit 4d17c59d8d059a5b39f1d1da2b58f2ec8da44861)
Change-Id: I497af39deb792e50c157a1305d8c9e722798740b
Diffstat (limited to 'src/libstore/serve-protocol.hh')
-rw-r--r-- | src/libstore/serve-protocol.hh | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/libstore/serve-protocol.hh b/src/libstore/serve-protocol.hh index e2345d450..a627c6ad6 100644 --- a/src/libstore/serve-protocol.hh +++ b/src/libstore/serve-protocol.hh @@ -31,25 +31,28 @@ struct ServeProto enum struct Command : uint64_t; /** + * Version type for the protocol. + * + * @todo Convert to struct with separate major vs minor fields. + */ + using Version = unsigned int; + + /** * A unidirectional read connection, to be used by the read half of the * canonical serializers below. - * - * This currently is just a `Source &`, but more fields will be added - * later. */ struct ReadConn { Source & from; + Version version; }; /** * A unidirectional write connection, to be used by the write half of the * canonical serializers below. - * - * This currently is just a `Sink &`, but more fields will be added - * later. */ struct WriteConn { Sink & to; + Version version; }; /** |