reifydb_core/event/flow.rs
1// SPDX-License-Identifier: AGPL-3.0-or-later
2// Copyright (c) 2025 ReifyDB
3
4use std::path::PathBuf;
5
6use reifydb_type::value::constraint::TypeConstraint;
7
8use crate::define_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
21define_event! {
22 /// Emitted when a flow operator library is loaded
23 pub 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}