pub trait TestNodeService:
Send
+ Sync
+ 'static {
type SubscribeEventsStream: Stream<Item = Result<NodeEvent, Status>> + Send + 'static;
// Required methods
fn ping<'life0, 'async_trait>(
&'life0 self,
request: Request<PingRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<PingResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_node_info<'life0, 'async_trait>(
&'life0 self,
request: Request<Empty>,
) -> Pin<Box<dyn Future<Output = Result<Response<NodeInfoResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn shutdown<'life0, 'async_trait>(
&'life0 self,
request: Request<ShutdownRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Empty>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn inject_fault<'life0, 'async_trait>(
&'life0 self,
request: Request<FaultRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Empty>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn clear_faults<'life0, 'async_trait>(
&'life0 self,
request: Request<Empty>,
) -> Pin<Box<dyn Future<Output = Result<Response<Empty>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn subscribe_events<'life0, 'async_trait>(
&'life0 self,
request: Request<EventFilter>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::SubscribeEventsStream>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn custom_command<'life0, 'async_trait>(
&'life0 self,
request: Request<CustomRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<CustomResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn spawn_actor<'life0, 'async_trait>(
&'life0 self,
request: Request<SpawnActorRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<SpawnActorResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn tell_actor<'life0, 'async_trait>(
&'life0 self,
request: Request<TellActorRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<TellActorResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn ask_actor<'life0, 'async_trait>(
&'life0 self,
request: Request<AskActorRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<AskActorResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn stop_actor<'life0, 'async_trait>(
&'life0 self,
request: Request<StopActorRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<StopActorResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn watch_actor<'life0, 'async_trait>(
&'life0 self,
request: Request<WatchActorRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<WatchActorResponse>, 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 TestNodeServiceServer.
Required Associated Types§
Required Methods§
Sourcefn ping<'life0, 'async_trait>(
&'life0 self,
request: Request<PingRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<PingResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn ping<'life0, 'async_trait>(
&'life0 self,
request: Request<PingRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<PingResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Ping — verify the node is alive and the control channel works
Sourcefn get_node_info<'life0, 'async_trait>(
&'life0 self,
request: Request<Empty>,
) -> Pin<Box<dyn Future<Output = Result<Response<NodeInfoResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_node_info<'life0, 'async_trait>(
&'life0 self,
request: Request<Empty>,
) -> Pin<Box<dyn Future<Output = Result<Response<NodeInfoResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Node info
Sourcefn shutdown<'life0, 'async_trait>(
&'life0 self,
request: Request<ShutdownRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Empty>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn shutdown<'life0, 'async_trait>(
&'life0 self,
request: Request<ShutdownRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Empty>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Shutdown
Sourcefn inject_fault<'life0, 'async_trait>(
&'life0 self,
request: Request<FaultRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Empty>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn inject_fault<'life0, 'async_trait>(
&'life0 self,
request: Request<FaultRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Empty>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Fault injection
fn clear_faults<'life0, 'async_trait>(
&'life0 self,
request: Request<Empty>,
) -> Pin<Box<dyn Future<Output = Result<Response<Empty>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sourcefn subscribe_events<'life0, 'async_trait>(
&'life0 self,
request: Request<EventFilter>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::SubscribeEventsStream>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn subscribe_events<'life0, 'async_trait>(
&'life0 self,
request: Request<EventFilter>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::SubscribeEventsStream>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Event subscription (server-streaming)
Sourcefn custom_command<'life0, 'async_trait>(
&'life0 self,
request: Request<CustomRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<CustomResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn custom_command<'life0, 'async_trait>(
&'life0 self,
request: Request<CustomRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<CustomResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Custom application commands
Sourcefn spawn_actor<'life0, 'async_trait>(
&'life0 self,
request: Request<SpawnActorRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<SpawnActorResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn spawn_actor<'life0, 'async_trait>(
&'life0 self,
request: Request<SpawnActorRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<SpawnActorResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Actor management
fn tell_actor<'life0, 'async_trait>(
&'life0 self,
request: Request<TellActorRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<TellActorResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn ask_actor<'life0, 'async_trait>(
&'life0 self,
request: Request<AskActorRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<AskActorResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn stop_actor<'life0, 'async_trait>(
&'life0 self,
request: Request<StopActorRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<StopActorResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sourcefn watch_actor<'life0, 'async_trait>(
&'life0 self,
request: Request<WatchActorRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<WatchActorResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn watch_actor<'life0, 'async_trait>(
&'life0 self,
request: Request<WatchActorRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<WatchActorResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Watch another actor — receive event when target stops