Trait dragonfly_api::scheduler::scheduler_server::Scheduler
source · pub trait Scheduler: Send + Sync + 'static {
type AnnouncePeerStream: Stream<Item = Result<AnnouncePeerResponse, Status>> + Send + 'static;
type SyncProbesStream: Stream<Item = Result<SyncProbesResponse, Status>> + Send + 'static;
// Required methods
fn announce_peer<'life0, 'async_trait>(
&'life0 self,
request: Request<Streaming<AnnouncePeerRequest>>
) -> Pin<Box<dyn Future<Output = Result<Response<Self::AnnouncePeerStream>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn stat_peer<'life0, 'async_trait>(
&'life0 self,
request: Request<StatPeerRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<Peer>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn leave_peer<'life0, 'async_trait>(
&'life0 self,
request: Request<LeavePeerRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<()>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn exchange_peer<'life0, 'async_trait>(
&'life0 self,
request: Request<ExchangePeerRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<ExchangePeerResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn stat_task<'life0, 'async_trait>(
&'life0 self,
request: Request<StatTaskRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<Task>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn announce_host<'life0, 'async_trait>(
&'life0 self,
request: Request<AnnounceHostRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<()>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn leave_host<'life0, 'async_trait>(
&'life0 self,
request: Request<LeaveHostRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<()>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn sync_probes<'life0, 'async_trait>(
&'life0 self,
request: Request<Streaming<SyncProbesRequest>>
) -> Pin<Box<dyn Future<Output = Result<Response<Self::SyncProbesStream>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}
Expand description
Generated trait containing gRPC methods that should be implemented for use with SchedulerServer.
Required Associated Types§
sourcetype AnnouncePeerStream: Stream<Item = Result<AnnouncePeerResponse, Status>> + Send + 'static
type AnnouncePeerStream: Stream<Item = Result<AnnouncePeerResponse, Status>> + Send + 'static
Server streaming response type for the AnnouncePeer method.
sourcetype SyncProbesStream: Stream<Item = Result<SyncProbesResponse, Status>> + Send + 'static
type SyncProbesStream: Stream<Item = Result<SyncProbesResponse, Status>> + Send + 'static
Server streaming response type for the SyncProbes method.
Required Methods§
sourcefn announce_peer<'life0, 'async_trait>(
&'life0 self,
request: Request<Streaming<AnnouncePeerRequest>>
) -> Pin<Box<dyn Future<Output = Result<Response<Self::AnnouncePeerStream>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn announce_peer<'life0, 'async_trait>( &'life0 self, request: Request<Streaming<AnnouncePeerRequest>> ) -> Pin<Box<dyn Future<Output = Result<Response<Self::AnnouncePeerStream>, Status>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
AnnouncePeer announces peer to scheduler.
sourcefn stat_peer<'life0, 'async_trait>(
&'life0 self,
request: Request<StatPeerRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<Peer>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn stat_peer<'life0, 'async_trait>( &'life0 self, request: Request<StatPeerRequest> ) -> Pin<Box<dyn Future<Output = Result<Response<Peer>, Status>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Checks information of peer.
sourcefn leave_peer<'life0, 'async_trait>(
&'life0 self,
request: Request<LeavePeerRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<()>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn leave_peer<'life0, 'async_trait>( &'life0 self, request: Request<LeavePeerRequest> ) -> Pin<Box<dyn Future<Output = Result<Response<()>, Status>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
LeavePeer releases peer in scheduler.
sourcefn exchange_peer<'life0, 'async_trait>(
&'life0 self,
request: Request<ExchangePeerRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<ExchangePeerResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn exchange_peer<'life0, 'async_trait>( &'life0 self, request: Request<ExchangePeerRequest> ) -> Pin<Box<dyn Future<Output = Result<Response<ExchangePeerResponse>, Status>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
TODO exchange peer api definition. ExchangePeer exchanges peer information.
sourcefn stat_task<'life0, 'async_trait>(
&'life0 self,
request: Request<StatTaskRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<Task>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn stat_task<'life0, 'async_trait>( &'life0 self, request: Request<StatTaskRequest> ) -> Pin<Box<dyn Future<Output = Result<Response<Task>, Status>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Checks information of task.
sourcefn announce_host<'life0, 'async_trait>(
&'life0 self,
request: Request<AnnounceHostRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<()>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn announce_host<'life0, 'async_trait>( &'life0 self, request: Request<AnnounceHostRequest> ) -> Pin<Box<dyn Future<Output = Result<Response<()>, Status>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
AnnounceHost announces host to scheduler.
sourcefn leave_host<'life0, 'async_trait>(
&'life0 self,
request: Request<LeaveHostRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<()>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn leave_host<'life0, 'async_trait>( &'life0 self, request: Request<LeaveHostRequest> ) -> Pin<Box<dyn Future<Output = Result<Response<()>, Status>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
LeaveHost releases host in scheduler.
sourcefn sync_probes<'life0, 'async_trait>(
&'life0 self,
request: Request<Streaming<SyncProbesRequest>>
) -> Pin<Box<dyn Future<Output = Result<Response<Self::SyncProbesStream>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn sync_probes<'life0, 'async_trait>( &'life0 self, request: Request<Streaming<SyncProbesRequest>> ) -> Pin<Box<dyn Future<Output = Result<Response<Self::SyncProbesStream>, Status>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
SyncProbes sync probes of the host.