-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ref: renamed tucana namespace from tucana_internal to tucana
- Loading branch information
1 parent
fdae6c9
commit c3d1540
Showing
6 changed files
with
26 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,29 @@ | ||
use std::sync::Arc; | ||
use async_trait::async_trait; | ||
use tokio::sync::Mutex; | ||
use tonic::{Response, Status, Streaming}; | ||
use tucana_internal::aquila::action_transfer_service_server::ActionTransferService; | ||
use tucana_internal::aquila::{InformationRequest, InformationResponse}; | ||
use tonic::{Request, Response, Status, Streaming}; | ||
use tucana::aquila::action_transfer_service_server::ActionTransferService; | ||
use tucana::aquila::{ActionExecuteRequest, InformationRequest, InformationResponse}; | ||
use crate::service::action_service::{ActionService, ActionServiceBase}; | ||
|
||
pub struct ActionTransferServerBase { | ||
action_service: Arc<Mutex<ActionServiceBase>>, | ||
} | ||
|
||
pub type ExecuteStream = (); | ||
|
||
/// gRPC Service Implementation | ||
#[async_trait] | ||
impl ActionTransferService for ActionTransferServerBase { | ||
/// Transfers `Flows` redivided from the `Action` to `Sagittarius` | ||
async fn transfer(&self, request: tonic::Request<Streaming<InformationRequest>>) -> Result<Response<InformationResponse>, Status> { | ||
async fn transfer(&self, request: Request<Streaming<InformationRequest>>) -> Result<Response<InformationResponse>, Status> { | ||
let mut service = self.action_service.lock().await; | ||
service.transfer_action_flows(request).await | ||
} | ||
|
||
type ExecuteStream = (); | ||
|
||
async fn execute(&self, request: Request<Streaming<ActionExecuteRequest>>) -> Result<Response<Self::ExecuteStream>, Status> { | ||
todo!() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters