#[non_exhaustive]pub enum NodeEvent {
Stop,
Reload {
operator_id: Option<OperatorId>,
},
Input {
id: DataId,
metadata: Arc<Metadata>,
data: Option<Arc<DataMessage>>,
},
InputClosed {
id: DataId,
},
InputRecovered {
id: DataId,
},
NodeRestarted {
id: NodeId,
},
AllInputsClosed,
ParamUpdate {
key: String,
value_json: Vec<u8>,
},
ParamDeleted {
key: String,
},
NodeFailed {
affected_input_ids: Vec<DataId>,
error: String,
source_node_id: NodeId,
},
ExtensionDropped {
namespace: String,
key: String,
},
}Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Stop
Reload
Fields
operator_id: Option<OperatorId>Input
InputClosed
InputRecovered
Notifies a node that a previously closed input has recovered and will receive data again.
NodeRestarted
Notifies a node that an upstream node has restarted.
Sent to downstream nodes when a node with a restart policy successfully restarts after a failure.
AllInputsClosed
Notifies a node that all its inputs have been closed.
This event is only sent to nodes that have at least one input.
ParamUpdate
A runtime parameter has been updated.
Sent when dora param set changes a parameter for this node.
value_json carries JSON-encoded bytes rather than serde_json::Value:
this message is serialized with postcard on the daemon↔node TCP channel,
and serde_json::Value::deserialize uses deserialize_any, which
postcard (like any non-self-describing format) does not support.
ParamDeleted
A runtime parameter has been deleted.
Sent when dora param delete removes a parameter for this node.
NodeFailed
An upstream node has failed.
Sent to downstream nodes when an upstream node exits with a non-zero exit code.
ExtensionDropped
An extension key this node stored or loaded has been dropped, by another node or by the daemon reclaiming it.
Delivered out of band: the event stream consumes it rather than
surfacing it to user code, so a language binding polls
drain_dropped_extension_keys() instead.
Implementations§
Source§impl NodeEvent
impl NodeEvent
Sourcepub fn encode_size_hint(&self) -> usize
pub fn encode_size_hint(&self) -> usize
Bulk bytes this event will contribute to the encoding of the
DaemonReply that wraps it.
Includes a flat per-event allowance for the Timestamped wrapper,
Metadata and ids, because these are batched: see
DaemonReply::encode_size_hint.