mirror of
https://github.com/NixOS/nix
synced 2025-06-29 02:11:15 +02:00
Add protocol versions to {Worker,Serve}Proto::*Conn
This will allow us to factor out logic, which is currently scattered inline, into several reusable instances The tests are also updated to support versioning. Currently all Worker and Serve protocol tests are using the minimum version, since no version-specific serialisers have been created yet. But in subsequent commits when that changes, we will test individual versions to ensure complete coverage.
This commit is contained in:
parent
ff68426095
commit
e36c9175f4
11 changed files with 185 additions and 75 deletions
|
@ -40,23 +40,19 @@ struct ServeProto
|
|||
/**
|
||||
* 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;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue