-
Notifications
You must be signed in to change notification settings - Fork 30
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
How to handle BecomeXXXX? #14
Comments
@billlin0904 thanks for the compliment! Can you explain more? I don’t understand what you want to do? |
I want use default implement class Node and notify my node state to server. public class MyNode : Node
} But Node class can't to override BecomeLeader. QQ |
Partial solution is to intercept handling of AppendEntries and RequestVote requests. In this handler check if Node.State.CurrentState.LeaderId changed and react on it. However this is just a partial solution because if this Node is a leader from the beginning there is no way to detect follower->candidate->leader change. Ideally Node should expose an even or have a virtual method or accept a delegate which called on state change. This is kind of a big issue because event if the algo itself works, I see no way to actually use it in real app which relies on leader/follower state. |
This is great library ever : )
I need to handle the node state and send my state to server,
but I can't find class , that be adapt the node state (ex: handler) ?
The text was updated successfully, but these errors were encountered: