Expand description
§tsoracle-proto
Generated protobuf / gRPC wire types for the tsoracle timestamp oracle.
This crate is the stable wire contract shared between tsoracle-server and tsoracle-client. Breaking changes are enforced via buf breaking in CI; new fields must be backwards-compatible.
§What’s in the box
v1module — all generated types fromproto/tsoracle/v1/tso.proto. Includes theTsoServicegRPC service definition, theGetTs/GetTsBatchrequest/response types, and theLeaderHintbinary-trailer payload type the server emits on follower-redirect.
You probably don’t depend on this crate directly. tsoracle-server and tsoracle-client re-export what consumers need at their respective seams.
§Feature flags
serde— derivesSerialize/Deserializeon the generated types so they cross storage and logging boundaries without a manual converter.reflection— bundles a binary descriptor set and enablestonic-reflection-based server reflection. Pulls intonic-reflection; off by default to keep dependency closure small for non-reflection consumers.
§Regenerating
The codegen runs at build time via build.rs. Modify proto/tsoracle/v1/tso.proto, rebuild, and the generated module updates. buf breaking runs in CI against main to catch incompatible changes before merge.
Modules§
Constants§
- FILE_
DESCRIPTOR_ SET - Encoded
FileDescriptorSetfor every proto compiled by this crate. Feed totonic_reflection::server::Builder::register_encoded_file_descriptor_setto expose gRPC server reflection (grpcurl,evans, Postman) without shipping the.protofiles to clients.