pub struct RuntimeInputs {
pub channel: ChannelIdentity,
pub channel_id: ChannelId,
pub self_node_id: NodeId,
pub replica_set: Vec<NodeId>,
pub heartbeat_ms: u64,
pub wall_clock_provider: Arc<dyn Fn() -> u64 + Send + Sync>,
pub tail_provider: Arc<dyn Fn() -> u64 + Send + Sync>,
pub rtt_lookup: RttLookup,
pub file: RedexFile,
pub default_bandwidth_class: BandwidthClass,
pub background_fraction: f32,
}Expand description
Inputs the runtime task captures at spawn time. The
tail_provider closure reads the current RedexFile::next_seq()
— passed as a closure so the runtime doesn’t take ownership of
the file handle (the file’s owner is Redex).
Fields§
§channel: ChannelIdentityChannel identity + origin_hash.
channel_id: ChannelId32-byte BLAKE2s channel id for the wire-format heartbeat.
self_node_id: NodeIdThis node’s id.
replica_set: Vec<NodeId>Replica-set membership — every node currently registered as a replica for the channel. Coordinator updates this when the placement filter re-selects (Phase C / F).
heartbeat_ms: u64Heartbeat cadence in milliseconds (mirrors
ReplicationConfig::heartbeat_ms). The tokio interval
drives at this cadence.
wall_clock_provider: Arc<dyn Fn() -> u64 + Send + Sync>Function returning the wall-clock milliseconds for the
outbound heartbeat’s wall_clock_ms field. Operator-
facing drift detection only; abstracted so tests can
inject a deterministic value.
tail_provider: Arc<dyn Fn() -> u64 + Send + Sync>Function returning the current local tail_seq. Called
each tick before emission so heartbeats carry the freshest
value.
rtt_lookup: RttLookupRTT lookup for the election function.
file: RedexFileThe local RedexFile for this channel. The runtime holds
a clone (RedexFile is Clone — Arc-backed) so it can
drive handle_sync_request on inbound SyncRequest
frames (leader path) and apply_sync_response on inbound
SyncResponse frames (replica path). The
tail_provider closure typically wraps file.next_seq().
default_bandwidth_class: BandwidthClassPer-channel default super::bandwidth::BandwidthClass — stamped on every
SyncRequest the runtime emits. v0.3 Phase D2. Sourced
from
ReplicationConfig::default_bandwidth_class.
background_fraction: f32v0.3 Phase D2 admission-gate parameter: fraction of the
bandwidth bucket capacity reserved against Background.
Default 0.3 via
ReplicationConfig::background_fraction.