#[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.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for NodeEvent
impl<'de> Deserialize<'de> for NodeEvent
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Forget for NodeEvent
impl Freeze for NodeEventwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
*const ArcInner<Metadata> is !null: Freeze,
PhantomData<ArcInner<Metadata>>: Freeze,
*const ArcInner<DataMessage> is !null: Freeze,
PhantomData<ArcInner<DataMessage>>: Freeze,
PhantomData<DataId>: Freeze,
impl Move for NodeEvent
impl RefUnwindSafe for NodeEvent
impl Send for NodeEvent
impl Sync for NodeEvent
impl Unpin for NodeEvent
impl UnsafeUnpin for NodeEventwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
*const ArcInner<Metadata> is !null: UnsafeUnpin,
PhantomData<ArcInner<Metadata>>: UnsafeUnpin,
*const ArcInner<DataMessage> is !null: UnsafeUnpin,
PhantomData<ArcInner<DataMessage>>: UnsafeUnpin,
PhantomData<DataId>: UnsafeUnpin,
impl UnwindSafe for NodeEvent
Blanket Implementations§
impl<T> Allocation for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more