Expand description
§Path manager
A PathManager provides applications with SCION paths. The method PathManager::path_wait is an async implementation that possibly awaits asynchronous, external path requests before returning. The sync-equivalent is SyncPathManager::try_cached_path which returns immediately in all cases.
The main implementation provided in this module is the CachingPathManager
which is an active component: CachingPathManager::start will start an
asynchronous background task (via tokio::spawn) that fetches requested
paths using the provided PathFetcher.
Typically, applications require paths to fulfill specific constraints and paths are ranked; i.e. some paths are preferred over others. In the case of the CachingPathManager such constraints are expressed via a PathPolicy: only paths that fulfill PathPolicy::predicate are returned and paths with a lower rank according to PathPolicy::rank are preferred.
Structs§
- Caching
Path Manager - Active path manager that runs as a background task
- Connect
RpcSegment Fetcher - Connect RPC segment fetcher.
- Path
Fetcher Impl - Path fetcher.
- Segments
- Path segments.
Enums§
- Path
Fetch Error - Path fetch errors.
- Path
ToError - Path fetch errors.
- Path
Wait Error - Path wait errors.
Traits§
- Path
Fetcher - Path fetcher trait.
- Path
Manager - Trait for active path management with async interface.
- Path
Prefetcher - Trait for prefetching paths in the path manager.
- Segment
Fetcher - Segment fetcher trait.
- Sync
Path Manager - Trait for active path management with sync interface. Implementors of this trait should be able to be used in sync and async context. The functions must not block.
Type Aliases§
- Segment
Fetch Error - Segment fetch error.