@@ -665,6 +665,9 @@ typedef struct
665
665
/** Callback for sending snapshot messages */
666
666
raft_send_snapshot_f send_snapshot ;
667
667
668
+ /** Callback for sending timeoutnow message */
669
+ raft_send_timeoutnow_f send_timeoutnow ;
670
+
668
671
/** Callback for loading snapshot. This will be called when we complete
669
672
* receiving snapshot from the leader */
670
673
raft_load_snapshot_f load_snapshot ;
@@ -697,30 +700,29 @@ typedef struct
697
700
/** Callback for detecting when a non-voting node has sufficient logs. */
698
701
raft_node_has_sufficient_logs_f node_has_sufficient_logs ;
699
702
700
- /** Callback for being notified of membership changes (optional). */
703
+ /** Callback to retrieve monotonic timestamp in microseconds */
704
+ raft_timestamp_f timestamp ;
705
+
706
+ /** (optional) Callback for being notified of membership changes. */
701
707
raft_membership_event_f notify_membership_event ;
702
708
703
- /** Callback for being notified of state changes (optional) . */
709
+ /** (optional) Callback for being notified of state changes. */
704
710
raft_state_event_f notify_state_event ;
705
711
706
- /** Callbakc for notified of transfer leadership events (optional) */
712
+ /** (optional) Callback for being notified of transfer leadership events. */
707
713
raft_transfer_event_f notify_transfer_event ;
708
714
709
- /** Callback for catching debugging log messages
710
- * This callback is optional */
715
+ /** (optional) Callback for catching debugging log messages. */
711
716
raft_log_f log ;
712
717
713
- /** Callback for sending TimeoutNow RPC messages to nodes */
714
- raft_send_timeoutnow_f send_timeoutnow ;
715
-
716
- /** Callback for deciding whether to send raft_appendentries_req to a node. */
718
+ /** (optional) Callback for deciding whether to send raft_appendentries_req
719
+ * to a node. */
717
720
raft_backpressure_f backpressure ;
718
721
719
- /** Callback for preparing entries to send in a raft_appendentries_req */
722
+ /** (optional) Callback for preparing entries to send in
723
+ * a raft_appendentries_req. */
720
724
raft_get_entries_to_send_f get_entries_to_send ;
721
725
722
- /** Callback to retrieve monotonic timestamp in microseconds */
723
- raft_timestamp_f timestamp ;
724
726
} raft_cbs_t ;
725
727
726
728
/** A callback used to notify when queued read requests can be processed.
0 commit comments