You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Configuration messages hold a version number, that should be used when parsing messages, since people might use an older tool with a new version of sozu.
The latest version is always the currently used ConfigMessage. ConfigMessageWrapperimplements Into<ConfigMessage>, so we need a way to transform a V0 message in a V1 one. It also has a function to get the version number.
Duplicate the assets in command/assets, so that we have subfolders for v0, v1, etc.
When the master parses messages, it will get the version number and hold onto it in the Client structure, to answer with the same version number.
Until the version 1.0 of sozu is released, the message format will have breaking changes, so for now the version number stays at 0.
The text was updated successfully, but these errors were encountered:
Configuration messages hold a version number, that should be used when parsing messages, since people might use an older tool with a new version of sozu.
The solution would be based on serde's tagged enum feature: serde-rs/serde#745 (a PR is currently in progress for this: serde-rs/serde#973 )
Here's how the code would change in
command/src/data.rs
:first define a
ConfigMessageWrapper
enum:The latest version is always the currently used
ConfigMessage
.ConfigMessageWrapper
implementsInto<ConfigMessage>
, so we need a way to transform a V0 message in a V1 one. It also has a function to get the version number.Duplicate the assets in
command/assets
, so that we have subfolders for v0, v1, etc.When the master parses messages, it will get the version number and hold onto it in the
Client
structure, to answer with the same version number.Until the version 1.0 of sozu is released, the message format will have breaking changes, so for now the version number stays at 0.
The text was updated successfully, but these errors were encountered: