Skip to main content

TestNodeService

Trait TestNodeService 

Source
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§

Source

type SubscribeEventsStream: Stream<Item = Result<NodeEvent, Status>> + Send + 'static

Server streaming response type for the SubscribeEvents method.

Required Methods§

Source

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

Source

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

Source

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

Source

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

Source

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,

Source

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)

Source

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

Source

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

Source

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,

Source

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,

Source

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,

Source

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

Implementors§