File tree Expand file tree Collapse file tree 2 files changed +22
-0
lines changed
internal/mithril-aggregator-discovery/src Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Original file line number Diff line number Diff line change 1+ //! Interface definition for Mithril Protocol Configuration provider.
2+
3+ use mithril_common:: StdResult ;
4+
5+ use crate :: model:: { AggregatorEndpoint , MithrilNetwork } ;
6+
7+ /// An aggregator discoverer.
8+ #[ cfg_attr( test, mockall:: automock) ]
9+ #[ async_trait:: async_trait]
10+ pub trait AggregatorDiscoverer : Sync + Send {
11+ /// Get an iterator over a list of available aggregators in a Mithril network.
12+ ///
13+ /// Note: there is no guarantee that the returned aggregators is sorted, complete or up-to-date.
14+ async fn get_available_aggregators (
15+ & self ,
16+ network : MithrilNetwork ,
17+ ) -> StdResult < Vec < AggregatorEndpoint > > ;
18+ }
Original file line number Diff line number Diff line change 11#![ warn( missing_docs) ]
22//! This crate provides mechanisms to discover aggregators in a Mithril network.
3+
4+ mod interface;
35mod model;
6+
7+ pub use interface:: AggregatorDiscoverer ;
48pub use model:: { AggregatorEndpoint , MithrilNetwork } ;
You can’t perform that action at this time.
0 commit comments