From cb2691ccfae6a17cf6f2ed652d52e96c1f4a43a7 Mon Sep 17 00:00:00 2001 From: dutchie032 Date: Tue, 10 Sep 2024 22:44:36 +0200 Subject: [PATCH 01/11] Added AdministrationService with GetHealth and GetVersion --- CHANGELOG.md | 1 + .../administration/v0/administration.proto | 20 ++++++++++++++++ protos/dcs/dcs.proto | 1 + src/rpc.rs | 1 + src/rpc/administration.rs | 23 +++++++++++++++++++ src/server.rs | 4 +++- stubs/src/administration.rs | 3 +++ stubs/src/lib.rs | 1 + 8 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 protos/dcs/administration/v0/administration.proto create mode 100644 src/rpc/administration.rs create mode 100644 stubs/src/administration.rs diff --git a/CHANGELOG.md b/CHANGELOG.md index 3383bb5e..32a6ac45 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Added `GetClients` to `SrsService`, which retrieves a list of units that are connected to SRS and the frequencies they are connected to. - Added `SrsConnectEvent` and `SrsDisconnectEvent` events - Added `GetDrawArgumentValue` API for units, which returns the value for drawing. (useful for "hook down", "doors open" checks) +- Added `AdministrationService` with `GetHealth` and `GetVersion` for quick checks on health (even when DCS server is unresponsive) and version. ### Fixed - Fixed `MarkAddEvent`, `MarkChangeEvent` and `MarkRemoveEvent` position diff --git a/protos/dcs/administration/v0/administration.proto b/protos/dcs/administration/v0/administration.proto new file mode 100644 index 00000000..88a368a5 --- /dev/null +++ b/protos/dcs/administration/v0/administration.proto @@ -0,0 +1,20 @@ +syntax = "proto3"; +package dcs.administration.v0; +option csharp_namespace = "RurouniJones.Dcs.Grpc.V0.Administration"; +option go_package = "github.com/DCS-gRPC/go-bindings/dcs/v0/administration"; + +//A service to get administrative data like health and version +service AdministrationService { + rpc GetHealth(GetHealthRequest) returns (GetHealthResponse) {} + rpc GetVersion(GetVersionRequest) returns (GetVersionResponse) {} +} + +message GetHealthRequest {} +message GetHealthResponse { + bool alive = 1; +} + +message GetVersionRequest {} +message GetVersionResponse { + string version = 1; +} \ No newline at end of file diff --git a/protos/dcs/dcs.proto b/protos/dcs/dcs.proto index 87d45cb0..5d949f46 100644 --- a/protos/dcs/dcs.proto +++ b/protos/dcs/dcs.proto @@ -2,6 +2,7 @@ syntax = "proto3"; package dcs; +import "dcs/administration/v0/administration.proto"; import "dcs/atmosphere/v0/atmosphere.proto"; import "dcs/coalition/v0/coalition.proto"; import "dcs/common/v0/common.proto"; diff --git a/src/rpc.rs b/src/rpc.rs index 4572d2e1..6c2be1ae 100644 --- a/src/rpc.rs +++ b/src/rpc.rs @@ -23,6 +23,7 @@ mod timer; mod trigger; mod unit; mod world; +mod administration; #[derive(Clone)] pub struct MissionRpc { diff --git a/src/rpc/administration.rs b/src/rpc/administration.rs new file mode 100644 index 00000000..f2523292 --- /dev/null +++ b/src/rpc/administration.rs @@ -0,0 +1,23 @@ +use stubs::administration::v0::administration_service_server::AdministrationService; +use stubs::*; +use tonic::{Request, Response, Status}; +use tonic::async_trait; + +use super::MissionRpc; + +#[async_trait] +impl AdministrationService for MissionRpc { + async fn get_health(&self, _request: Request, + ) -> Result, Status> { + let alive : bool = true ; + return Ok(Response::new(administration::v0::GetHealthResponse { alive } )) + } + + async fn get_version(&self, _request: Request, + ) -> Result, Status> + { + const VERSION: Option<&str> = option_env!("CARGO_PKG_VERSION"); + let version = VERSION.unwrap_or("unknown").to_string(); + return Ok(Response::new(administration::v0::GetVersionResponse { version } )) + } +} \ No newline at end of file diff --git a/src/server.rs b/src/server.rs index c70b8acf..eea5d824 100644 --- a/src/server.rs +++ b/src/server.rs @@ -5,6 +5,7 @@ use std::time::Duration; use dcs_module_ipc::IPC; use futures_util::FutureExt; +use stubs::administration::v0::administration_service_server::AdministrationServiceServer; use stubs::atmosphere::v0::atmosphere_service_server::AtmosphereServiceServer; use stubs::coalition::v0::coalition_service_server::CoalitionServiceServer; use stubs::controller::v0::controller_service_server::ControllerServiceServer; @@ -205,7 +206,7 @@ async fn try_run( srs_transmit, } = state; - let mut mission_rpc = + let mut mission_rpc: MissionRpc = MissionRpc::new(ipc_mission.clone(), stats.clone(), shutdown_signal.clone()); let mut hook_rpc = HookRpc::new(ipc_hook, stats, shutdown_signal.clone()); @@ -243,6 +244,7 @@ async fn try_run( }); transport::Server::builder() + .add_service(AdministrationServiceServer::new(mission_rpc.clone())) .add_service(AtmosphereServiceServer::new(mission_rpc.clone())) .add_service(CoalitionServiceServer::new(mission_rpc.clone())) .add_service(ControllerServiceServer::new(mission_rpc.clone())) diff --git a/stubs/src/administration.rs b/stubs/src/administration.rs new file mode 100644 index 00000000..239a057e --- /dev/null +++ b/stubs/src/administration.rs @@ -0,0 +1,3 @@ +pub mod v0 { + tonic::include_proto!("dcs.administration.v0"); +} \ No newline at end of file diff --git a/stubs/src/lib.rs b/stubs/src/lib.rs index bd60b350..ad71dc8b 100644 --- a/stubs/src/lib.rs +++ b/stubs/src/lib.rs @@ -3,6 +3,7 @@ #![allow(clippy::derive_partial_eq_without_eq)] #![allow(clippy::large_enum_variant)] +pub mod administration; pub mod atmosphere; pub mod coalition; pub mod common; From 23fcef0d30f479379a0441c7a5bc1652d37cd9a2 Mon Sep 17 00:00:00 2001 From: dutchie032 Date: Tue, 10 Sep 2024 22:50:39 +0200 Subject: [PATCH 02/11] proto lint fixes --- protos/dcs/administration/v0/administration.proto | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/protos/dcs/administration/v0/administration.proto b/protos/dcs/administration/v0/administration.proto index 88a368a5..de72bd96 100644 --- a/protos/dcs/administration/v0/administration.proto +++ b/protos/dcs/administration/v0/administration.proto @@ -5,16 +5,20 @@ option go_package = "github.com/DCS-gRPC/go-bindings/dcs/v0/administration"; //A service to get administrative data like health and version service AdministrationService { + rpc GetHealth(GetHealthRequest) returns (GetHealthResponse) {} + rpc GetVersion(GetVersionRequest) returns (GetVersionResponse) {} } message GetHealthRequest {} + message GetHealthResponse { bool alive = 1; } message GetVersionRequest {} + message GetVersionResponse { string version = 1; } \ No newline at end of file From 51432b312bb4a8a1c0f5ffb9dc9b83a9d61b3689 Mon Sep 17 00:00:00 2001 From: dutchie032 Date: Tue, 10 Sep 2024 22:51:57 +0200 Subject: [PATCH 03/11] proto lint fixes --- protos/dcs/administration/v0/administration.proto | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/protos/dcs/administration/v0/administration.proto b/protos/dcs/administration/v0/administration.proto index de72bd96..a32a139b 100644 --- a/protos/dcs/administration/v0/administration.proto +++ b/protos/dcs/administration/v0/administration.proto @@ -11,13 +11,15 @@ service AdministrationService { rpc GetVersion(GetVersionRequest) returns (GetVersionResponse) {} } -message GetHealthRequest {} +message GetHealthRequest { +} message GetHealthResponse { bool alive = 1; } -message GetVersionRequest {} +message GetVersionRequest { +} message GetVersionResponse { string version = 1; From c456ef1476172fad8d649078806344abbdc3e43a Mon Sep 17 00:00:00 2001 From: dutchie032 Date: Tue, 10 Sep 2024 22:53:25 +0200 Subject: [PATCH 04/11] proto lint fixes --- protos/dcs/administration/v0/administration.proto | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/protos/dcs/administration/v0/administration.proto b/protos/dcs/administration/v0/administration.proto index a32a139b..2beea60d 100644 --- a/protos/dcs/administration/v0/administration.proto +++ b/protos/dcs/administration/v0/administration.proto @@ -6,9 +6,9 @@ option go_package = "github.com/DCS-gRPC/go-bindings/dcs/v0/administration"; //A service to get administrative data like health and version service AdministrationService { - rpc GetHealth(GetHealthRequest) returns (GetHealthResponse) {} + rpc GetHealth(GetHealthRequest) returns (GetHealthResponse) {} - rpc GetVersion(GetVersionRequest) returns (GetVersionResponse) {} + rpc GetVersion(GetVersionRequest) returns (GetVersionResponse) {} } message GetHealthRequest { From 9f4e3503087cca7d1a965fed676455739da5128b Mon Sep 17 00:00:00 2001 From: dutchie032 Date: Tue, 10 Sep 2024 22:53:39 +0200 Subject: [PATCH 05/11] proto lint fixes --- protos/dcs/administration/v0/administration.proto | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/protos/dcs/administration/v0/administration.proto b/protos/dcs/administration/v0/administration.proto index 2beea60d..6dc124d0 100644 --- a/protos/dcs/administration/v0/administration.proto +++ b/protos/dcs/administration/v0/administration.proto @@ -15,12 +15,12 @@ message GetHealthRequest { } message GetHealthResponse { - bool alive = 1; + bool alive = 1; } message GetVersionRequest { } message GetVersionResponse { - string version = 1; + string version = 1; } \ No newline at end of file From 64759452721d471c8338ae596ffd1a71a8b5aa39 Mon Sep 17 00:00:00 2001 From: dutchie032 Date: Tue, 10 Sep 2024 23:06:08 +0200 Subject: [PATCH 06/11] rust lint fixes --- src/rpc.rs | 3 ++- src/rpc/administration.rs | 20 ++++++++++++++------ stubs/src/administration.rs | 2 +- 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/src/rpc.rs b/src/rpc.rs index 6c2be1ae..5c1788bc 100644 --- a/src/rpc.rs +++ b/src/rpc.rs @@ -10,6 +10,7 @@ pub use self::srs::Srs; use crate::shutdown::ShutdownHandle; use crate::stats::Stats; +mod administration; mod atmosphere; mod coalition; mod controller; @@ -23,7 +24,7 @@ mod timer; mod trigger; mod unit; mod world; -mod administration; + #[derive(Clone)] pub struct MissionRpc { diff --git a/src/rpc/administration.rs b/src/rpc/administration.rs index f2523292..f93220a7 100644 --- a/src/rpc/administration.rs +++ b/src/rpc/administration.rs @@ -1,23 +1,31 @@ use stubs::administration::v0::administration_service_server::AdministrationService; use stubs::*; -use tonic::{Request, Response, Status}; use tonic::async_trait; +use tonic::{Request, Response, Status}; use super::MissionRpc; #[async_trait] impl AdministrationService for MissionRpc { - async fn get_health(&self, _request: Request, + async fn get_health( + &self, + _request: Request, ) -> Result, Status> { - let alive : bool = true ; - return Ok(Response::new(administration::v0::GetHealthResponse { alive } )) + let alive : bool = true; + return Ok(Response::new(administration::v0::GetHealthResponse { + alive, + })) } - async fn get_version(&self, _request: Request, + async fn get_version( + &self, + _request: Request, ) -> Result, Status> { const VERSION: Option<&str> = option_env!("CARGO_PKG_VERSION"); let version = VERSION.unwrap_or("unknown").to_string(); - return Ok(Response::new(administration::v0::GetVersionResponse { version } )) + return Ok(Response::new(administration::v0::GetVersionResponse { + version, + })); } } \ No newline at end of file diff --git a/stubs/src/administration.rs b/stubs/src/administration.rs index 239a057e..06b58dec 100644 --- a/stubs/src/administration.rs +++ b/stubs/src/administration.rs @@ -1,3 +1,3 @@ pub mod v0 { tonic::include_proto!("dcs.administration.v0"); -} \ No newline at end of file +} From 3918cd36d232388b0a1d560c267f38485e96f6e5 Mon Sep 17 00:00:00 2001 From: dutchie032 Date: Tue, 10 Sep 2024 23:15:30 +0200 Subject: [PATCH 07/11] rust lint fixes --- CHANGELOG.md | 2 +- src/rpc/administration.rs | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 32a6ac45..07ac648f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,7 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Added `GetClients` to `SrsService`, which retrieves a list of units that are connected to SRS and the frequencies they are connected to. - Added `SrsConnectEvent` and `SrsDisconnectEvent` events - Added `GetDrawArgumentValue` API for units, which returns the value for drawing. (useful for "hook down", "doors open" checks) -- Added `AdministrationService` with `GetHealth` and `GetVersion` for quick checks on health (even when DCS server is unresponsive) and version. +- Added `AdministrationService` with `GetHealth` and `GetVersion` for quick checks on health (even when DCS mission is unresponsive) and version. ### Fixed - Fixed `MarkAddEvent`, `MarkChangeEvent` and `MarkRemoveEvent` position diff --git a/src/rpc/administration.rs b/src/rpc/administration.rs index f93220a7..5b3fd68a 100644 --- a/src/rpc/administration.rs +++ b/src/rpc/administration.rs @@ -14,14 +14,13 @@ impl AdministrationService for MissionRpc { let alive : bool = true; return Ok(Response::new(administration::v0::GetHealthResponse { alive, - })) + })); } async fn get_version( &self, _request: Request, - ) -> Result, Status> - { + ) -> Result, Status> { const VERSION: Option<&str> = option_env!("CARGO_PKG_VERSION"); let version = VERSION.unwrap_or("unknown").to_string(); return Ok(Response::new(administration::v0::GetVersionResponse { From ec492cb69c7af3073cb5f50bc1b25ff30b85c8d6 Mon Sep 17 00:00:00 2001 From: dutchie032 Date: Tue, 10 Sep 2024 23:21:36 +0200 Subject: [PATCH 08/11] rust lint fixes --- src/rpc/administration.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rpc/administration.rs b/src/rpc/administration.rs index 5b3fd68a..9ef2357e 100644 --- a/src/rpc/administration.rs +++ b/src/rpc/administration.rs @@ -11,8 +11,8 @@ impl AdministrationService for MissionRpc { &self, _request: Request, ) -> Result, Status> { - let alive : bool = true; - return Ok(Response::new(administration::v0::GetHealthResponse { + let alive: bool = true; + return Ok(Response::new(administration::v0::GetHealthResponse { alive, })); } From 32a0bf4c6d735d88017cd3535d66f9db6fbbee7a Mon Sep 17 00:00:00 2001 From: dutchie032 Date: Tue, 10 Sep 2024 23:21:55 +0200 Subject: [PATCH 09/11] rust lint fixes --- src/rpc/administration.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rpc/administration.rs b/src/rpc/administration.rs index 9ef2357e..893098aa 100644 --- a/src/rpc/administration.rs +++ b/src/rpc/administration.rs @@ -18,7 +18,7 @@ impl AdministrationService for MissionRpc { } async fn get_version( - &self, + &self, _request: Request, ) -> Result, Status> { const VERSION: Option<&str> = option_env!("CARGO_PKG_VERSION"); From e4b279130f0554d0fe4f8d4ebd0db7f1c7acccdf Mon Sep 17 00:00:00 2001 From: dutchie032 Date: Tue, 10 Sep 2024 23:31:03 +0200 Subject: [PATCH 10/11] rust lint fixes --- src/rpc.rs | 1 - src/rpc/administration.rs | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/rpc.rs b/src/rpc.rs index 5c1788bc..6856fee0 100644 --- a/src/rpc.rs +++ b/src/rpc.rs @@ -25,7 +25,6 @@ mod trigger; mod unit; mod world; - #[derive(Clone)] pub struct MissionRpc { ipc: IPC, diff --git a/src/rpc/administration.rs b/src/rpc/administration.rs index 893098aa..c4dce305 100644 --- a/src/rpc/administration.rs +++ b/src/rpc/administration.rs @@ -8,7 +8,7 @@ use super::MissionRpc; #[async_trait] impl AdministrationService for MissionRpc { async fn get_health( - &self, + &self, _request: Request, ) -> Result, Status> { let alive: bool = true; @@ -27,4 +27,4 @@ impl AdministrationService for MissionRpc { version, })); } -} \ No newline at end of file +} From eff3537198ef40c1ff2ca27bcab72c22557bf9dc Mon Sep 17 00:00:00 2001 From: dutchie032 Date: Tue, 24 Sep 2024 19:12:31 +0200 Subject: [PATCH 11/11] updated administration service to metadataservice --- protos/dcs/dcs.proto | 2 +- .../v0/metadata.proto} | 10 +++---- src/rpc.rs | 2 +- src/rpc/administration.rs | 30 ------------------- src/rpc/metadata.rs | 26 ++++++++++++++++ src/server.rs | 4 +-- stubs/src/administration.rs | 3 -- stubs/src/lib.rs | 2 +- stubs/src/metadata.rs | 3 ++ 9 files changed, 39 insertions(+), 43 deletions(-) rename protos/dcs/{administration/v0/administration.proto => metadata/v0/metadata.proto} (54%) delete mode 100644 src/rpc/administration.rs create mode 100644 src/rpc/metadata.rs delete mode 100644 stubs/src/administration.rs create mode 100644 stubs/src/metadata.rs diff --git a/protos/dcs/dcs.proto b/protos/dcs/dcs.proto index 5d949f46..293d3221 100644 --- a/protos/dcs/dcs.proto +++ b/protos/dcs/dcs.proto @@ -2,7 +2,6 @@ syntax = "proto3"; package dcs; -import "dcs/administration/v0/administration.proto"; import "dcs/atmosphere/v0/atmosphere.proto"; import "dcs/coalition/v0/coalition.proto"; import "dcs/common/v0/common.proto"; @@ -10,6 +9,7 @@ import "dcs/controller/v0/controller.proto"; import "dcs/custom/v0/custom.proto"; import "dcs/group/v0/group.proto"; import "dcs/hook/v0/hook.proto"; +import "dcs/metadata/v0/metadata.proto"; import "dcs/mission/v0/mission.proto"; import "dcs/net/v0/net.proto"; import "dcs/srs/v0/srs.proto"; diff --git a/protos/dcs/administration/v0/administration.proto b/protos/dcs/metadata/v0/metadata.proto similarity index 54% rename from protos/dcs/administration/v0/administration.proto rename to protos/dcs/metadata/v0/metadata.proto index 6dc124d0..938d4ce3 100644 --- a/protos/dcs/administration/v0/administration.proto +++ b/protos/dcs/metadata/v0/metadata.proto @@ -1,10 +1,10 @@ syntax = "proto3"; -package dcs.administration.v0; -option csharp_namespace = "RurouniJones.Dcs.Grpc.V0.Administration"; -option go_package = "github.com/DCS-gRPC/go-bindings/dcs/v0/administration"; +package dcs.metadata.v0; +option csharp_namespace = "RurouniJones.Dcs.Grpc.V0.Metadata"; +option go_package = "github.com/DCS-gRPC/go-bindings/dcs/v0/metadata"; -//A service to get administrative data like health and version -service AdministrationService { +//A service to get administrative/meta data like server health checks and version +service MetadataService { rpc GetHealth(GetHealthRequest) returns (GetHealthResponse) {} diff --git a/src/rpc.rs b/src/rpc.rs index 6856fee0..499c005a 100644 --- a/src/rpc.rs +++ b/src/rpc.rs @@ -10,13 +10,13 @@ pub use self::srs::Srs; use crate::shutdown::ShutdownHandle; use crate::stats::Stats; -mod administration; mod atmosphere; mod coalition; mod controller; mod custom; mod group; mod hook; +mod metadata; mod mission; mod net; mod srs; diff --git a/src/rpc/administration.rs b/src/rpc/administration.rs deleted file mode 100644 index c4dce305..00000000 --- a/src/rpc/administration.rs +++ /dev/null @@ -1,30 +0,0 @@ -use stubs::administration::v0::administration_service_server::AdministrationService; -use stubs::*; -use tonic::async_trait; -use tonic::{Request, Response, Status}; - -use super::MissionRpc; - -#[async_trait] -impl AdministrationService for MissionRpc { - async fn get_health( - &self, - _request: Request, - ) -> Result, Status> { - let alive: bool = true; - return Ok(Response::new(administration::v0::GetHealthResponse { - alive, - })); - } - - async fn get_version( - &self, - _request: Request, - ) -> Result, Status> { - const VERSION: Option<&str> = option_env!("CARGO_PKG_VERSION"); - let version = VERSION.unwrap_or("unknown").to_string(); - return Ok(Response::new(administration::v0::GetVersionResponse { - version, - })); - } -} diff --git a/src/rpc/metadata.rs b/src/rpc/metadata.rs new file mode 100644 index 00000000..415c82db --- /dev/null +++ b/src/rpc/metadata.rs @@ -0,0 +1,26 @@ +use stubs::metadata::v0::metadata_service_server::MetadataService; +use stubs::*; +use tonic::async_trait; +use tonic::{Request, Response, Status}; + +use super::MissionRpc; + +#[async_trait] +impl MetadataService for MissionRpc { + async fn get_health( + &self, + _request: Request, + ) -> Result, Status> { + let alive: bool = true; + return Ok(Response::new(metadata::v0::GetHealthResponse { alive })); + } + + async fn get_version( + &self, + _request: Request, + ) -> Result, Status> { + const VERSION: Option<&str> = option_env!("CARGO_PKG_VERSION"); + let version = VERSION.unwrap_or("unknown").to_string(); + return Ok(Response::new(metadata::v0::GetVersionResponse { version })); + } +} diff --git a/src/server.rs b/src/server.rs index eea5d824..4bcd7610 100644 --- a/src/server.rs +++ b/src/server.rs @@ -5,13 +5,13 @@ use std::time::Duration; use dcs_module_ipc::IPC; use futures_util::FutureExt; -use stubs::administration::v0::administration_service_server::AdministrationServiceServer; use stubs::atmosphere::v0::atmosphere_service_server::AtmosphereServiceServer; use stubs::coalition::v0::coalition_service_server::CoalitionServiceServer; use stubs::controller::v0::controller_service_server::ControllerServiceServer; use stubs::custom::v0::custom_service_server::CustomServiceServer; use stubs::group::v0::group_service_server::GroupServiceServer; use stubs::hook::v0::hook_service_server::HookServiceServer; +use stubs::metadata::v0::metadata_service_server::MetadataServiceServer; use stubs::mission::v0::mission_service_server::MissionServiceServer; use stubs::mission::v0::StreamEventsResponse; use stubs::net::v0::net_service_server::NetServiceServer; @@ -244,13 +244,13 @@ async fn try_run( }); transport::Server::builder() - .add_service(AdministrationServiceServer::new(mission_rpc.clone())) .add_service(AtmosphereServiceServer::new(mission_rpc.clone())) .add_service(CoalitionServiceServer::new(mission_rpc.clone())) .add_service(ControllerServiceServer::new(mission_rpc.clone())) .add_service(CustomServiceServer::new(mission_rpc.clone())) .add_service(GroupServiceServer::new(mission_rpc.clone())) .add_service(HookServiceServer::new(hook_rpc)) + .add_service(MetadataServiceServer::new(mission_rpc.clone())) .add_service(MissionServiceServer::new(mission_rpc.clone())) .add_service(NetServiceServer::new(mission_rpc.clone())) .add_service(TimerServiceServer::new(mission_rpc.clone())) diff --git a/stubs/src/administration.rs b/stubs/src/administration.rs deleted file mode 100644 index 06b58dec..00000000 --- a/stubs/src/administration.rs +++ /dev/null @@ -1,3 +0,0 @@ -pub mod v0 { - tonic::include_proto!("dcs.administration.v0"); -} diff --git a/stubs/src/lib.rs b/stubs/src/lib.rs index ad71dc8b..9b107bf4 100644 --- a/stubs/src/lib.rs +++ b/stubs/src/lib.rs @@ -3,7 +3,6 @@ #![allow(clippy::derive_partial_eq_without_eq)] #![allow(clippy::large_enum_variant)] -pub mod administration; pub mod atmosphere; pub mod coalition; pub mod common; @@ -11,6 +10,7 @@ pub mod controller; pub mod custom; pub mod group; pub mod hook; +pub mod metadata; pub mod mission; pub mod net; pub mod srs; diff --git a/stubs/src/metadata.rs b/stubs/src/metadata.rs new file mode 100644 index 00000000..3e83a462 --- /dev/null +++ b/stubs/src/metadata.rs @@ -0,0 +1,3 @@ +pub mod v0 { + tonic::include_proto!("dcs.metadata.v0"); +}