aurelia 0.1.0

Embeddable service mesh for Rust distributed applications.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// This file is part of the Aurelia workspace.
// SPDX-FileCopyrightText: 2026 Zivatar Limited
// SPDX-License-Identifier: Apache-2.0

use crate::ids::AureliaError;
use crate::ids::TabernaId;
use crate::peering::address::DomusAddr;

/// Application-supplied resolver that maps a target [`TabernaId`] to the
/// [`DomusAddr`] of the peer hosting it. Aurelia calls this on every send
/// so applications can implement service discovery as they see fit.
#[async_trait::async_trait]
pub trait RouteResolver: Send + Sync {
    /// Resolves `taberna_id` to the [`DomusAddr`] of the peer that hosts it.
    async fn resolve(&self, taberna_id: TabernaId) -> Result<DomusAddr, AureliaError>;
}