pub struct HashiverseServer {
pub runtime_services: Arc<RuntimeServices>,
pub environment: Arc<Environment>,
pub server_id: ServerId,
pub kademlia: Arc<RwLock<Kademlia<Id, Peer>>>,
pub transport_server: Arc<dyn TransportServer>,
pub peer_self: Arc<RwLock<Peer>>,
pub heal_in_progress: Cache<Id, ()>,
pub seen_salts: Cache<Salt, ()>,
pub post_bundle_cache: PostBundleCache,
pub post_bundle_feedback_cache: PostBundleFeedbackCache,
pub trending_hashtags: Cache<String, HyperLogLog>,
pub trending_hashtags_response_cache: Mutex<Option<(TimeMillis, TrendingHashtagsFetchResponseV1)>>,
}Fields§
§runtime_services: Arc<RuntimeServices>§environment: Arc<Environment>§server_id: ServerId§kademlia: Arc<RwLock<Kademlia<Id, Peer>>>§transport_server: Arc<dyn TransportServer>§peer_self: Arc<RwLock<Peer>>§heal_in_progress: Cache<Id, ()>§seen_salts: Cache<Salt, ()>§post_bundle_cache: PostBundleCache§post_bundle_feedback_cache: PostBundleFeedbackCacheImplementations§
Source§impl HashiverseServer
impl HashiverseServer
pub async fn wrap_and_dispatch_network_envelopes( &self, cancellation_token: CancellationToken, rx: Receiver<IncomingRequest>, ) -> Result<(), Error>
Source§impl HashiverseServer
impl HashiverseServer
pub async fn new( runtime_services: Arc<RuntimeServices>, environment_factory: Arc<dyn EnvironmentFactory>, args: Args, ) -> Result<Arc<Self>>
pub async fn run(&self, cancellation_token: CancellationToken)
pub async fn add_potential_peer_to_kademlia( &self, peer: Peer, time_millis: TimeMillis, )
Auto Trait Implementations§
impl !Freeze for HashiverseServer
impl !RefUnwindSafe for HashiverseServer
impl Send for HashiverseServer
impl Sync for HashiverseServer
impl Unpin for HashiverseServer
impl UnsafeUnpin for HashiverseServer
impl !UnwindSafe for HashiverseServer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more