-
Notifications
You must be signed in to change notification settings - Fork 123
Reservations add protocol version #920
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reservations add protocol version #920
Conversation
43642ef to
bfdecb3
Compare
bfdecb3 to
3eab968
Compare
| const ( | ||
| // ProtocolVersionServerInitiated is the protocol version where the | ||
| // server initiates the reservation. | ||
| ProtocolVersionServerInitiated ProtocolVersion = 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we could have a CurrentProtocolVersion function that returns the last one, so we don't need to pass it in when creating a new reservation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no current as we will still use both simultaneously
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Discussed offline, so the reason to not have is because there will be two current versions, one for the client requested one for the server requested.
| } | ||
|
|
||
| var states fsm.States | ||
| switch reservation.ProtocolVersion { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be nice to log here which version of the state machine is running. Perhaps also consider adding a String() function to the ProtocolVersion type.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1, will do that for the static state machine as well.
bhandras
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🎉
| const ( | ||
| // ProtocolVersionServerInitiated is the protocol version where the | ||
| // server initiates the reservation. | ||
| ProtocolVersionServerInitiated ProtocolVersion = 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Discussed offline, so the reason to not have is because there will be two current versions, one for the client requested one for the server requested.
3eab968 to
8add1f3
Compare
|
@starius: review reminder |
hieblmi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM ✅
| } | ||
|
|
||
| var states fsm.States | ||
| switch reservation.ProtocolVersion { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1, will do that for the static state machine as well.
8add1f3 to
02f9573
Compare
02f9573 to
56848d0
Compare
This PR adds a protocol version to the reservation state machine