Expand description
Derive macros for Rivven connector development
This crate provides procedural macros that reduce boilerplate when implementing Rivven connectors.
§Example
ⓘ
use rivven_connect_derive::{SourceConfig, SinkConfig, connector_spec};
#[derive(Debug, Deserialize, Validate, JsonSchema, SourceConfig)]
#[source(
name = "my-source",
version = "1.0.0",
description = "Custom data source",
author = "Rivven Team",
license = "Apache-2.0",
documentation_url = "https://rivven.dev/docs/connectors/my-source"
)]
pub struct MySourceConfig {
#[validate(url)]
pub endpoint: String,
#[validate(range(min = 1, max = 100))]
pub batch_size: usize,
}
#[derive(Debug, Deserialize, Validate, JsonSchema, SinkConfig)]
#[sink(
name = "my-sink",
version = "1.0.0",
batching,
batch_size = 1000
)]
pub struct MySinkConfig {
pub bucket: String,
}Attribute Macros§
- connector_
spec - Attribute macro for defining connector specifications inline
Derive Macros§
- Sink
Config - Derive macro for implementing SinkConfig boilerplate
- Source
Config - Derive macro for implementing SourceConfig boilerplate
- Transform
Config - Derive macro for implementing TransformConfig boilerplate