36 lines
1.1 KiB
Rust
36 lines
1.1 KiB
Rust
use nxmesh_proto::{AgentMessage, MasterMessage, agent_service_server::AgentService};
|
|
|
|
pub mod repo;
|
|
|
|
#[derive(Debug, Default)]
|
|
pub struct AgentServerService {}
|
|
|
|
#[async_trait::async_trait]
|
|
impl AgentService for AgentServerService {
|
|
#[doc = " Server streaming response type for the Stream method."]
|
|
type StreamStream = tonic::codec::Streaming<MasterMessage>;
|
|
|
|
#[doc = " Stream establishes a persistent connection for real-time communication"]
|
|
#[allow(
|
|
mismatched_lifetime_syntaxes,
|
|
clippy::type_complexity,
|
|
clippy::type_repetition_in_bounds
|
|
)]
|
|
async fn stream(
|
|
&self,
|
|
request: tonic::Request<tonic::Streaming<AgentMessage>>,
|
|
) -> Result<tonic::Response<Self::StreamStream>, tonic::Status> {
|
|
todo!()
|
|
}
|
|
|
|
async fn connection_test(
|
|
&self,
|
|
_request: tonic::Request<nxmesh_proto::TestRequest>,
|
|
) -> Result<tonic::Response<nxmesh_proto::TestResponse>, tonic::Status> {
|
|
Ok(tonic::Response::new(nxmesh_proto::TestResponse {
|
|
success: true,
|
|
error_message: String::new(),
|
|
}))
|
|
}
|
|
}
|