| Crates.io | conveyor-etl-proto |
| lib.rs | conveyor-etl-proto |
| version | 0.1.0 |
| created_at | 2025-12-23 00:55:37.474955+00 |
| updated_at | 2025-12-23 00:55:37.474955+00 |
| description | Protocol buffer definitions for Conveyor ETL |
| homepage | |
| repository | |
| max_upload_size | |
| id | 2000530 |
| size | 69,631 |
Protocol buffer definitions and generated Rust code.
This crate contains all .proto files defining the gRPC services and message types used throughout Conveyor. The Rust code is generated at build time using tonic-build.
| File | Description |
|---|---|
common.proto |
Shared types: Record, RecordBatch, Endpoint, etc. |
source.proto |
SourceService for pulling records |
transform.proto |
TransformService for processing batches |
sink.proto |
SinkService for writing records |
lookup.proto |
LookupService for enrichment |
registry.proto |
ServiceRegistry for service discovery |
checkpoint.proto |
CheckpointService for offset management |
sidecar.proto |
SidecarCoordinator and SidecarDataPlane |
raft.proto |
Raft consensus protocol |
backup.proto |
Backup and restore operations |
router.proto |
Router-specific types |
service SourceService {
rpc PullRecords(PullRequest) returns (stream RecordBatch);
rpc Acknowledge(AckRequest) returns (AckResponse);
rpc GetWatermark(Empty) returns (WatermarkResponse);
}
service TransformService {
rpc ProcessBatch(ProcessBatchRequest) returns (ProcessBatchResponse);
rpc GetCapabilities(Empty) returns (Capabilities);
}
service SinkService {
rpc WriteBatch(WriteBatchRequest) returns (WriteBatchResponse);
rpc GetCapacity(Empty) returns (CapacityResponse);
rpc Flush(FlushRequest) returns (FlushResponse);
}
service ServiceRegistry {
rpc Register(RegisterRequest) returns (RegisterResponse);
rpc Deregister(DeregisterRequest) returns (DeregisterResponse);
rpc Heartbeat(stream HeartbeatRequest) returns (stream HeartbeatResponse);
rpc WatchServices(WatchServicesRequest) returns (stream ServiceEvent);
}
service SidecarCoordinator {
rpc RegisterSidecar(RegisterSidecarRequest) returns (RegisterSidecarResponse);
rpc Heartbeat(SidecarHeartbeatRequest) returns (SidecarHeartbeatResponse);
}
service SidecarDataPlane {
rpc ReceiveRecords(ReceiveRecordsRequest) returns (ReceiveRecordsResponse);
rpc PushRecords(stream RecordBatch) returns (PushResponse);
}
message Record {
string record_id = 1;
string record_type = 2;
bytes payload = 3;
map<string, string> metadata = 4;
google.protobuf.Timestamp timestamp = 5;
string source_id = 6;
uint64 sequence_number = 7;
}
message RecordBatch {
string batch_id = 1;
repeated Record records = 2;
Watermark watermark = 3;
}
use conveyor_proto::common::{Record, RecordBatch};
use conveyor_proto::transform::transform_service_client::TransformServiceClient;
use conveyor_proto::sink::sink_service_server::SinkServiceServer;
// Client usage
let mut client = TransformServiceClient::connect("http://localhost:50051").await?;
// Server usage
let service = MySinkService::new();
Server::builder()
.add_service(SinkServiceServer::new(service))
.serve(addr)
.await?;
Proto files are compiled during cargo build via build.rs:
fn main() {
tonic_build::configure()
.build_server(true)
.build_client(true)
.compile(
&["proto/common.proto", "proto/source.proto", ...],
&["proto/"],
)
.unwrap();
}
pub mod common { /* Record, RecordBatch, Endpoint, ... */ }
pub mod source { /* SourceService client/server */ }
pub mod transform { /* TransformService client/server */ }
pub mod sink { /* SinkService client/server */ }
pub mod lookup { /* LookupService client/server */ }
pub mod registry { /* ServiceRegistry client/server */ }
pub mod checkpoint { /* CheckpointService client/server */ }
pub mod sidecar { /* SidecarCoordinator, SidecarDataPlane */ }
pub mod raft { /* RaftService client/server */ }
pub mod backup { /* BackupService client/server */ }