ascii-chat
Binary v0.15.83-53-gb711d8720
Library lib/v0.3.2-701-gb711d8720
Video chat in your terminal
Loading...
Searching...
No Matches
session_consensus_callbacks_t Struct Reference

Mode-specific hooks used by the session consensus adapter. More...

#include <src/common/session/consensus.h>

Data Fields

session_consensus_send_packet_fn send_packet
 Send packet callback.
session_consensus_on_election_fn on_election
 Election result callback.
session_consensus_get_metrics_fn get_metrics
 Measure metrics callback.
session_consensus_election_fn election
 Custom election callback (optional, NULL = use default).
void * context
 Opaque context passed to all callbacks.

Detailed Description

Mode-specific hooks used by the session consensus adapter.

The adapter uses these functions to send protocol packets, publish election results, gather participant metrics, and optionally replace the default election algorithm. context is passed unchanged to every callback.

Definition at line 130 of file consensus.h.

Field Documentation

◆ context

void* session_consensus_callbacks_t::context

Opaque context passed to all callbacks.

Definition at line 135 of file consensus.h.

Referenced by consensus_get_discovery_callbacks(), and session_consensus_create().

◆ election

session_consensus_election_fn session_consensus_callbacks_t::election

Custom election callback (optional, NULL = use default).

Definition at line 134 of file consensus.h.

Referenced by consensus_get_discovery_callbacks(), and session_consensus_create().

◆ get_metrics

session_consensus_get_metrics_fn session_consensus_callbacks_t::get_metrics

Measure metrics callback.

Definition at line 133 of file consensus.h.

Referenced by consensus_get_discovery_callbacks(), and session_consensus_create().

◆ on_election

session_consensus_on_election_fn session_consensus_callbacks_t::on_election

Election result callback.

Definition at line 132 of file consensus.h.

Referenced by consensus_get_discovery_callbacks(), and session_consensus_create().

◆ send_packet

session_consensus_send_packet_fn session_consensus_callbacks_t::send_packet

Send packet callback.

Definition at line 131 of file consensus.h.

Referenced by consensus_get_discovery_callbacks(), and session_consensus_create().


The documentation for this struct was generated from the following file: