rill_server/actors/server/
link.rs1use super::RillServer;
2use derive_more::From;
3use meio::{Address, Interaction, InteractionTask};
4use meio_connect::server::HttpServerLink;
5
6#[derive(Debug, From)]
8pub struct ServerLink {
9 address: Address<RillServer>,
10}
11
12pub struct WaitPublicEndpoint;
14
15impl Interaction for WaitPublicEndpoint {
16 type Output = HttpServerLink;
17}
18
19impl ServerLink {
20 pub fn wait_public_endpoint(&self) -> InteractionTask<WaitPublicEndpoint> {
22 self.address.interact(WaitPublicEndpoint)
23 }
24}
25
26pub struct WaitPrivateEndpoint;
28
29impl Interaction for WaitPrivateEndpoint {
30 type Output = HttpServerLink;
31}
32
33impl ServerLink {
34 pub fn wait_private_endpoint(&self) -> InteractionTask<WaitPrivateEndpoint> {
36 self.address.interact(WaitPrivateEndpoint)
37 }
38}