#![forbid(unsafe_code)]
//! gRPC network transport for tidalDB WAL segment shipping.
//!
//! This crate provides [`GrpcTransport`], an implementation of tidalDB's
//! [`Transport`](tidaldb::replication::Transport) trait that ships WAL segments
//! between shards over gRPC using tonic.
//!
//! # Crate Boundary
//!
//! Network code lives here, not in the `tidal` core crate. The core remains
//! embeddable with zero network dependencies.

pub mod circuit_breaker;
pub mod client;
pub mod config;
pub mod convert;
pub mod error;
pub mod server;
pub mod tls;
pub mod transport;

/// Generated protobuf types for the WAL shipping service.
///
/// This module is tonic/prost code generation output (`include_proto!`); we do
/// not control its style. The allows below cover exactly the pedantic/nursery
/// lints the generated code trips and apply to nothing hand-written.
#[allow(
    clippy::doc_markdown,
    clippy::missing_errors_doc,
    clippy::derive_partial_eq_without_eq,
    clippy::default_trait_access,
    clippy::missing_const_for_fn,
    clippy::too_many_lines
)]
pub mod proto {
    tonic::include_proto!("tidal.replication.v1");
}

pub use config::{GrpcTransportConfig, TlsConfig};
pub use error::GrpcTransportError;
pub use transport::{GrpcTransport, GrpcTransportFactory};
