re_uri/lib.rs
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
//! Rerun uses its own URL scheme to access information across the network.
//!
//! The following schemes are supported: `rerun+http://`, `rerun+https://` and
//! `rerun://`, which is an alias for `rerun+https://`. These schemes are then
//! converted on the fly to either `http://` or `https://`. Rerun uses gRPC-based
//! protocols under the hood, which means that the paths (`/catalog`,
//! `/recording/12345`, …) are mapped to gRPC services and methods on the fly.
//!
//! <div class="warning">
//! In most cases locally running instances of Rerun will not have proper TLS
//! configuration. In these cases, the `rerun+http://` scheme can be used. Naturally,
//! this means that the underlying connection will not be encrypted.
//! </div>
//!
//! The following are examples of valid Rerun URIs:
//!
//! ```
//! for uri in [
//! // Access the dataplatform catalog.
//! "rerun://rerun.io",
//! "rerun://rerun.io:51234/catalog",
//! "rerun+http://localhost:51234/catalog",
//! "rerun+https://localhost:51234/catalog",
//!
//! // Proxy to send messages to another viewer.
//! "rerun+http://localhost:51234/proxy",
//!
//! // Links to recording on the dataplatform (optionally with timestamp).
//! "rerun://127.0.0.1:1234/dataset/1830B33B45B963E7774455beb91701ae/data?partition_id=pid&time_range=timeline@1.23s..72s",
//! ] {
//! assert!(uri.parse::<re_uri::RedapUri>().is_ok());
//! }
//!
//! ```
mod endpoints;
mod error;
mod fragment;
mod origin;
mod redap_uri;
mod scheme;
mod time_range;
pub use self::{
endpoints::{catalog::CatalogUri, dataset::DatasetDataUri, entry::EntryUri, proxy::ProxyUri},
error::Error,
fragment::Fragment,
origin::Origin,
redap_uri::RedapUri,
scheme::Scheme,
time_range::TimeRange,
};
pub mod external {
pub use url;
}
/// The default port of a Rerun gRPC proxy server.
pub const DEFAULT_PROXY_PORT: u16 = 9876;
/// The default port of a redap server.
pub const DEFAULT_REDAP_PORT: u16 = 51234;