diff --git a/src/client/sagittarius/action_client.rs b/src/client/sagittarius/action_client.rs index c9f466e..2dcd6d2 100644 --- a/src/client/sagittarius/action_client.rs +++ b/src/client/sagittarius/action_client.rs @@ -2,9 +2,9 @@ use async_trait::async_trait; use log::{error, info}; use tonic::transport::Channel; use tonic::{Request, Response}; -use tucana_internal::aquila::InformationRequest; -use tucana_internal::sagittarius::action_service_client::ActionServiceClient; -use tucana_internal::sagittarius::{ActionLogoffRequest, ActionLogoffResponse, ActionLogonRequest, ActionLogonResponse}; +use tucana::aquila::InformationRequest; +use tucana::sagittarius::action_service_client::ActionServiceClient; +use tucana::sagittarius::{ActionLogoffRequest, ActionLogoffResponse, ActionLogonRequest, ActionLogonResponse}; /// Struct representing a service for sending flows received from an `Action` to `Sagittarius`. /// Part that informs `Sagittarius` @@ -83,13 +83,13 @@ impl SagittariusActionClient for SagittariusActionClientBase { mod tests { use super::*; use tonic::{transport::Server, Request, Response, Status}; - use tucana_internal::sagittarius::{ + use tucana::sagittarius::{ action_service_server::{ActionService, ActionServiceServer}, ActionLogoffRequest, ActionLogoffResponse, ActionLogonRequest, ActionLogonResponse, }; use std::net::SocketAddr; use tokio::task::JoinHandle; - use tucana_internal::shared::{RuntimeFunctionDefinition, RuntimeParameterDefinition}; + use tucana::shared::{RuntimeFunctionDefinition, RuntimeParameterDefinition}; #[derive(Debug, Default)] struct MockActionService; diff --git a/src/client/sagittarius/flow_client.rs b/src/client/sagittarius/flow_client.rs index 50369ec..13ba01d 100644 --- a/src/client/sagittarius/flow_client.rs +++ b/src/client/sagittarius/flow_client.rs @@ -7,8 +7,8 @@ use std::sync::Arc; use tokio::sync::Mutex; use tonic::transport::Channel; use tonic::Request; -use tucana_internal::sagittarius::flow_service_client::FlowServiceClient; -use tucana_internal::sagittarius::{FlowCommandType, FlowGetRequest, FlowLogonRequest, FlowResponse}; +use tucana::sagittarius::flow_service_client::FlowServiceClient; +use tucana::sagittarius::{FlowCommandType, FlowGetRequest, FlowLogonRequest, FlowResponse}; const INSERT: i32 = FlowCommandType::Insert as i32; const DELETE: i32 = FlowCommandType::Delete as i32; @@ -153,8 +153,8 @@ mod tests { use tonic::codegen::tokio_stream::Stream; use tonic::transport::Server; use tonic::{Request, Response, Status}; - use tucana_internal::sagittarius::flow_service_server::{FlowService as SagittariusFlowService, FlowServiceServer}; - use tucana_internal::sagittarius::{Flow, FlowGetRequest, FlowGetResponse, FlowLogonRequest, FlowResponse}; + use tucana::sagittarius::flow_service_server::{FlowService as SagittariusFlowService, FlowServiceServer}; + use tucana::sagittarius::{Flow, FlowGetRequest, FlowGetResponse, FlowLogonRequest, FlowResponse}; struct MockFlowService { flow_get_result: FlowGetResponse, diff --git a/src/configuration/start_configuration.rs b/src/configuration/start_configuration.rs index 8514f5f..a292cd3 100644 --- a/src/configuration/start_configuration.rs +++ b/src/configuration/start_configuration.rs @@ -9,8 +9,8 @@ use log::{debug, error, info}; use redis::aio::MultiplexedConnection; use tokio::sync::Mutex; use tokio::time::Interval; -use tucana_internal::sagittarius::Flow; -use tucana_internal::sagittarius::flow_service_client::FlowServiceClient; +use tucana::sagittarius::Flow; +use tucana::sagittarius::flow_service_client::FlowServiceClient; use crate::client::sagittarius::flow_client::{SagittariusFlowClient, SagittariusFlowClientBase}; use crate::configuration::config::Config; use crate::service::flow_service::{FlowService, FlowServiceBase}; diff --git a/src/server/action/action_server.rs b/src/server/action/action_server.rs index f0b1f97..63a6c85 100644 --- a/src/server/action/action_server.rs +++ b/src/server/action/action_server.rs @@ -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>, } +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>) -> Result, Status> { + async fn transfer(&self, request: Request>) -> Result, Status> { let mut service = self.action_service.lock().await; service.transfer_action_flows(request).await } + + type ExecuteStream = (); + + async fn execute(&self, request: Request>) -> Result, Status> { + todo!() + } } \ No newline at end of file diff --git a/src/service/action_service.rs b/src/service/action_service.rs index 8dba0e8..c6a6a7f 100644 --- a/src/service/action_service.rs +++ b/src/service/action_service.rs @@ -3,7 +3,7 @@ use futures::StreamExt; use log::error; use tokio::sync::Mutex; use tonic::{Request, Response, Status, Streaming}; -use tucana_internal::aquila::{InformationRequest, InformationResponse}; +use tucana::aquila::{InformationRequest, InformationResponse}; use crate::client::sagittarius::action_client::{SagittariusActionClient, SagittariusActionClientBase}; /// Struct representing a service for sending flows received from an `Action` to `Sagittarius`. diff --git a/src/service/flow_service.rs b/src/service/flow_service.rs index b051878..6af637e 100644 --- a/src/service/flow_service.rs +++ b/src/service/flow_service.rs @@ -5,7 +5,7 @@ use redis::aio::MultiplexedConnection; use redis::{AsyncCommands, RedisError}; use std::sync::Arc; use tokio::sync::Mutex; -use tucana_internal::sagittarius::Flow; +use tucana::sagittarius::Flow; /// Struct representing a service for managing flows in a Redis. pub struct FlowServiceBase { @@ -144,7 +144,7 @@ mod tests { use std::sync::{Arc}; use redis::AsyncCommands; use tokio::sync::Mutex; - use tucana_internal::sagittarius::Flow; + use tucana::sagittarius::Flow; use crate::data::redis::setup_redis_test_container; use crate::service::flow_service::{FlowService, FlowServiceBase};