pub mod shared;
#[cfg(not(target_family = "wasm"))]
pub mod native;
pub use shared::error_writer::ErrorWriter;
pub use shared::message::{Request, Response};
pub use shared::router::{
in_memory_body, CallHooks, CollectingSink, ConnectRpcHandler, DeadlineTimer, HandlerOptions,
RequestBody, RequestStream, ResponseSink, Router,
};
pub use foundation_macros::{generate, service};
pub use buffa;
pub use shared::client::{BidiStream, Client, ClientOptions, ClientStream, ServerStream};
#[cfg(not(target_family = "wasm"))]
pub use native::server::{ConnectRpcServe, ServeTimeouts};
#[cfg(not(target_family = "wasm"))]
pub use native::h2_serve::ConnectRpcServeH2;
pub use shared::protocol::{
canonicalize_content_type, parse_connect_content_type, ClientExchange, ClientExchangeConfig,
ExchangeConfig, HandlerExchange, ProtocolClient, ProtocolHandler,
};
pub use shared::protocol::connect::{ConnectClient, ConnectHandler};
pub use shared::protocol::grpc::{GrpcClient, GrpcHandler};
pub use shared::protocol::grpc_web::{GrpcWebClient, GrpcWebHandler};
pub use shared::interceptor::{
Interceptor, InterceptorChain, RecoverInterceptor, StreamCall, StreamingClientFunc,
StreamingHandlerFunc, UnaryCall, UnaryFunc, UnaryInterceptorFunc, UnaryReply,
};
#[cfg(feature = "auth")]
pub use shared::auth::{
authenticate_request, bearer_token, get_auth_artifact, get_auth_info, infer_procedure,
infer_protocol, AuthFunc, AuthInfo, AuthzInterceptor, CompositeAuthenticator,
JwtAuthenticator, PerProcedureAuth,
};
pub use shared::transport::{
check_compatible, requirements, CallRequirements, ClientConn, ConnReceiver, ConnSender,
Frame, HandlerConn, MessageSink, MessageSource, ProtocolKind, Transport, TransportCapabilities,
TransportError,
};
pub use shared::transport::h1::H1Transport;
pub use shared::transport::ws::WsTransport;
#[cfg(not(target_family = "wasm"))]
pub use native::transport::h2::H2Transport;
#[cfg(all(not(target_family = "wasm"), feature = "h3"))]
pub use native::transport::h3::H3Transport;
pub use shared::envelope::{
decode_grpc_timeout, encode_grpc_timeout, Envelope, EnvelopeError, EnvelopeReader,
EnvelopeWriter,
};
pub use shared::context::{
CancelSignal, Ctx, IdempotencyLevel, Peer, RequestContext, Spec, StreamType,
};
pub use shared::codec::{Codec, CodecError, CodecFor, JsonCodec, ProcedureCodecs, ProtoCodec};
pub use shared::compression::{
negotiate_compression, with_worker_buffer, worker_freeze, BufferPool, CompressionError,
CompressionRegistry, Compressor, GzipCompressor, GzipStreamCompressor, NegotiatedCompression,
SizeLimits,
};
#[cfg(feature = "brotli")]
pub use shared::compression::BrotliCompressor;
#[cfg(feature = "zstd")]
pub use shared::compression::ZstdCompressor;
pub use shared::error::{
code_of, wrap_if_context, wrap_if_h2c, wrap_if_rst, wrap_if_uncoded, Code, ConnectError,
ConnectResult, EndStreamResponse, ErrorDetail, WireError, WireErrorDetail, ERRSTACKS_TYPE_URL,
};
#[cfg(feature = "arrow")]
pub use shared::codec::ArrowCodec;