| Crates.io | conveyor-etl-grpc |
| lib.rs | conveyor-etl-grpc |
| version | 0.1.0 |
| created_at | 2025-12-23 02:59:08.130586+00 |
| updated_at | 2025-12-23 02:59:08.130586+00 |
| description | gRPC handlers and server for Conveyor ETL |
| homepage | |
| repository | |
| max_upload_size | |
| id | 2000674 |
| size | 125,275 |
gRPC server implementations and client wrappers.
This crate provides all gRPC service implementations for the router, plus client wrappers for calling external services (transforms, sinks, lookups).
Main server that hosts all gRPC services:
use conveyor_grpc::RouterServer;
let server = RouterServer::new(
node_id,
grpc_addr,
raft_addr,
peers,
data_dir,
settings,
).await?;
server.run().await?;
| Handler | Proto Service | Description |
|---|---|---|
SourceHandler |
SourceService |
Handle source push/pull |
RegistryHandler |
ServiceRegistry |
Service registration |
CheckpointHandler |
CheckpointService |
Offset management |
SidecarHandler |
SidecarCoordinator |
Sidecar coordination |
use conveyor_grpc::transform_client::TransformClient;
let mut client = TransformClient::connect(
"http://transform-svc:50051".to_string(),
"my-transform".to_string(),
).await?;
let response = client.process_batch(batch, config).await?;
use conveyor_grpc::sink_client::SinkClient;
let mut client = SinkClient::connect(
"http://sink-svc:50051".to_string(),
"my-sink".to_string(),
).await?;
client.write_batch(batch, options).await?;
client.flush(true).await?;
use conveyor_grpc::lookup_client::LookupClient;
let mut client = LookupClient::connect(
"http://lookup-svc:50051".to_string(),
"my-lookup".to_string(),
).await?;
let result = client.lookup(record, key_fields).await?;
let results = client.batch_lookup(records, key_fields).await?;
┌─────────────────────────────────────────────────────┐
│ RouterServer │
├─────────────────────────────────────────────────────┤
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
│ │ Source │ │ Registry │ │ Checkpoint │ │
│ │ Handler │ │ Handler │ │ Handler │ │
│ └─────────────┘ └─────────────┘ └─────────────┘ │
│ ┌─────────────┐ ┌─────────────┐ │
│ │ Sidecar │ │ Raft │ │
│ │ Handler │ │ Transport │ │
│ └─────────────┘ └─────────────┘ │
├─────────────────────────────────────────────────────┤
│ Client Wrappers │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
│ │ Transform │ │ Sink │ │ Lookup │ │
│ │ Client │ │ Client │ │ Client │ │
│ └─────────────┘ └─────────────┘ └─────────────┘ │
└─────────────────────────────────────────────────────┘
Handles sidecar lifecycle:
use conveyor_grpc::SidecarCoordinatorImpl;
// Sidecar registration
// - Receives sidecar's local services
// - Proposes RegisterSidecar to Raft
// - Returns initial pipeline assignments
// Heartbeat
// - Receives health updates
// - Returns commands (Assign, Revoke, Drain)
pub use server::RouterServer;
pub use sidecar_handler::SidecarCoordinatorImpl;
conveyor-proto - Protocol buffer definitionsconveyor-raft - Raft consensusconveyor-registry - Service registrytonic - gRPC framework