reifydb_core/event/
flow.rs

1// Copyright (c) reifydb.com 2025
2// This file is licensed under the AGPL-3.0-or-later, see license.md file
3
4use std::path::PathBuf;
5
6use reifydb_type::TypeConstraint;
7
8use crate::impl_event;
9
10/// Information about a single column definition in an operator
11#[derive(Debug, Clone)]
12pub struct OperatorColumnDef {
13	/// Column name
14	pub name: String,
15	/// Column type constraint
16	pub field_type: TypeConstraint,
17	/// Human-readable description
18	pub description: String,
19}
20
21/// Emitted when a flow operator library is loaded
22#[derive(Debug, Clone)]
23pub struct FlowOperatorLoadedEvent {
24	/// Name of the operator
25	pub operator: String,
26	/// Path to the shared library containing the operator
27	pub library_path: PathBuf,
28	/// API version of the operator
29	pub api: u32,
30	/// Semantic version of the operator
31	pub version: String,
32	/// Human-readable description of the operator
33	pub description: String,
34	/// Input column definitions
35	pub input: Vec<OperatorColumnDef>,
36	/// Output column definitions
37	pub output: Vec<OperatorColumnDef>,
38	/// Capabilities bitflags
39	pub capabilities: u32,
40}
41
42impl_event!(FlowOperatorLoadedEvent);