Skip to main content

pb_mapper_client/sdk/
mod.rs

1//! Library API for talking to a deployed pb-mapper relay.
2//!
3//! A [`Client`] holds the relay address and a credential. From there the same
4//! process can register local services, subscribe to them, inspect tenant
5//! status, and — with an administrator credential — drive every admin RPC.
6
7mod admin;
8mod client;
9mod error;
10mod handle;
11mod types;
12
13pub use admin::{
14    Admin, AuthStatusInfo, ConnectionInfo, ConnectionPage, IssuedKey, KeyListPage, KeyMetadata,
15    ServiceInfo, ServicePage,
16};
17pub use client::{Client, ClientConfig, ConnectRequest, RegisterRequest};
18pub use error::{Error, Result};
19pub use handle::{Connection, Registration};
20pub use types::{
21    ConnectOptions, LegacyProtocol, PathPolicy, PortMapping, RegisterOptions, RemoteId,
22    ServiceConnection, Transport, TunnelStatus,
23};
24
25/// The SDK version compiled into this process.
26pub const SDK_VERSION: &str = env!("CARGO_PKG_VERSION");
27pub use crate::diagnostics::{
28    DirectAttempt, DirectStage, EventsLagged, PathDiagnostics, PortMappingDiagnostics,
29    PortMappingProtocol, PortMappingStage, PortMappingStatus, RecoveryFailure, RecoveryPhase,
30    TunnelDiagnostics, TunnelEvent, TunnelEventKind, TunnelEvents,
31};
32pub use pb_mapper_protocol::direct::{
33    ObservedReport, SessionObservation, SessionPath, SessionState,
34};
35
36pub use crate::relay::{
37    QUIC_UNAVAILABLE, QuicConnectionDiagnostics, RelayDiagnostics, RelayTransport,
38};