feat: with compose
This commit is contained in:
@@ -35,9 +35,37 @@ pub struct Project {
|
||||
#[prost(string, tag = "2")]
|
||||
pub image: ::prost::alloc::string::String,
|
||||
#[prost(string, tag = "3")]
|
||||
#[prost(uint32, optional, tag="2")]
|
||||
pub port: ::core::option::Option<u32>,
|
||||
#[prost(oneof="project::ProjectType", tags="3, 4")]
|
||||
pub project_type: ::core::option::Option<project::ProjectType>,
|
||||
}
|
||||
/// Nested message and enum types in `Project`.
|
||||
pub mod project {
|
||||
#[allow(clippy::derive_partial_eq_without_eq)]
|
||||
#[derive(Clone, PartialEq, ::prost::Oneof)]
|
||||
pub enum ProjectType {
|
||||
#[prost(message, tag="3")]
|
||||
Container(super::Container),
|
||||
#[prost(message, tag="4")]
|
||||
Compose(super::Compose),
|
||||
}
|
||||
}
|
||||
#[allow(clippy::derive_partial_eq_without_eq)]
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
pub struct Container {
|
||||
#[prost(string, tag="1")]
|
||||
pub image: ::prost::alloc::string::String,
|
||||
#[prost(string, tag="2")]
|
||||
pub version: ::prost::alloc::string::String,
|
||||
#[prost(uint32, optional, tag = "4")]
|
||||
pub port: ::core::option::Option<u32>,
|
||||
}
|
||||
#[allow(clippy::derive_partial_eq_without_eq)]
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
pub struct Compose {
|
||||
#[prost(map="string, bytes", tag="1")]
|
||||
pub files: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::vec::Vec<u8>>,
|
||||
}
|
||||
include!("norun.v1.tonic.rs");
|
||||
// @@protoc_insertion_point(module)
|
||||
|
@@ -4,7 +4,6 @@ pub mod registry_service_client {
|
||||
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
|
||||
use tonic::codegen::*;
|
||||
use tonic::codegen::http::Uri;
|
||||
///
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct RegistryServiceClient<T> {
|
||||
inner: tonic::client::Grpc<T>,
|
||||
@@ -85,7 +84,6 @@ pub mod registry_service_client {
|
||||
self.inner = self.inner.max_encoding_message_size(limit);
|
||||
self
|
||||
}
|
||||
///
|
||||
pub async fn publish(
|
||||
&mut self,
|
||||
request: impl tonic::IntoRequest<super::PublishRequest>,
|
||||
@@ -111,7 +109,6 @@ pub mod registry_service_client {
|
||||
.insert(GrpcMethod::new("norun.v1.RegistryService", "Publish"));
|
||||
self.inner.unary(req, path, codec).await
|
||||
}
|
||||
///
|
||||
pub async fn get_topic(
|
||||
&mut self,
|
||||
request: impl tonic::IntoRequest<super::GetTopicRequest>,
|
||||
@@ -146,12 +143,10 @@ pub mod registry_service_server {
|
||||
/// Generated trait containing gRPC methods that should be implemented for use with RegistryServiceServer.
|
||||
#[async_trait]
|
||||
pub trait RegistryService: Send + Sync + 'static {
|
||||
///
|
||||
async fn publish(
|
||||
&self,
|
||||
request: tonic::Request<super::PublishRequest>,
|
||||
) -> std::result::Result<tonic::Response<super::PublishResponse>, tonic::Status>;
|
||||
///
|
||||
async fn get_topic(
|
||||
&self,
|
||||
request: tonic::Request<super::GetTopicRequest>,
|
||||
@@ -160,7 +155,6 @@ pub mod registry_service_server {
|
||||
tonic::Status,
|
||||
>;
|
||||
}
|
||||
///
|
||||
#[derive(Debug)]
|
||||
pub struct RegistryServiceServer<T: RegistryService> {
|
||||
inner: _Inner<T>,
|
||||
|
Reference in New Issue
Block a user