1mod dispatcher;
16pub mod error;
17mod etl;
18mod manager;
19mod metrics;
20pub mod options;
21mod tablesuffix;
22
23pub use etl::ctx_req::{ContextOpt, ContextReq};
24pub use etl::processor::Processor;
25pub use etl::transform::GreptimeTransformer;
26pub use etl::transform::transformer::greptime::{GreptimePipelineParams, SchemaInfo};
27pub use etl::transform::transformer::identity_pipeline;
28pub use etl::{
29 Content, DispatchedTo, Pipeline, PipelineExecOutput, PipelineProcessOutput, TransformedOutput,
30 TransformerMode, parse,
31};
32pub use manager::{
33 GREPTIME_INTERNAL_IDENTITY_PIPELINE_NAME, GREPTIME_INTERNAL_TRACE_PIPELINE_V1_NAME,
34 GREPTIME_INTERNAL_TRACE_PIPELINE_V2_NAME, IdentityTimeIndex, PipelineContext,
35 PipelineDefinition, PipelineInfo, PipelineRef, PipelineTableRef, PipelineVersion, PipelineWay,
36 SelectInfo, pipeline_operator, table, util,
37};
38pub use options::PipelineOptions;
39
40#[macro_export]
41macro_rules! unwrap_or_continue_if_err {
42 ($result:expr, $condition:expr) => {{
43 match $result {
44 Ok(value) => value,
45 Err(e) => {
46 if $condition {
47 continue;
48 } else {
49 return Err(e);
50 }
51 }
52 }
53 }};
54}
55
56pub fn truthy<V: AsRef<str>>(v: V) -> bool {
57 let v = v.as_ref().to_lowercase();
58 v == "true" || v == "1" || v == "yes" || v == "on" || v == "t"
59}