#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Error {
#[prost(enumeration = "ErrorCode", tag = "1")]
pub code: i32,
#[prost(string, tag = "2")]
pub message: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Path {
#[prost(string, repeated, tag = "1")]
pub segments: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct EventSourceSchema {
#[prost(message, optional, tag = "1")]
pub source: ::core::option::Option<Path>,
#[prost(string, tag = "2")]
pub event: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct QuerySourceSchema {
#[prost(message, optional, tag = "1")]
pub source: ::core::option::Option<Path>,
#[prost(string, tag = "2")]
pub request: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub reply: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct EventSinkSchema {
#[prost(message, optional, tag = "1")]
pub sink: ::core::option::Option<Path>,
#[prost(string, tag = "2")]
pub event: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct EventKey {
#[prost(uint64, tag = "1")]
pub subkey1: u64,
#[prost(uint64, tag = "2")]
pub subkey2: u64,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct BuildRequest {
#[prost(bytes = "vec", tag = "1")]
pub cfg: ::prost::alloc::vec::Vec<u8>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct BuildReply {
#[prost(oneof = "build_reply::Result", tags = "1, 100")]
pub result: ::core::option::Option<build_reply::Result>,
}
pub mod build_reply {
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
pub enum Result {
#[prost(message, tag = "1")]
Empty(()),
#[prost(message, tag = "100")]
Error(super::Error),
}
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct InitRequest {
#[prost(message, optional, tag = "1")]
pub time: ::core::option::Option<::prost_types::Timestamp>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct InitReply {
#[prost(oneof = "init_reply::Result", tags = "1, 100")]
pub result: ::core::option::Option<init_reply::Result>,
}
pub mod init_reply {
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
pub enum Result {
#[prost(message, tag = "1")]
Empty(()),
#[prost(message, tag = "100")]
Error(super::Error),
}
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct InitAndRunRequest {
#[prost(message, optional, tag = "1")]
pub time: ::core::option::Option<::prost_types::Timestamp>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct InitAndRunReply {
#[prost(oneof = "init_and_run_reply::Result", tags = "1, 100")]
pub result: ::core::option::Option<init_and_run_reply::Result>,
}
pub mod init_and_run_reply {
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
pub enum Result {
#[prost(message, tag = "1")]
Time(::prost_types::Timestamp),
#[prost(message, tag = "100")]
Error(super::Error),
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct RestoreRequest {
#[prost(bytes = "vec", tag = "1")]
pub state: ::prost::alloc::vec::Vec<u8>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct RestoreReply {
#[prost(oneof = "restore_reply::Result", tags = "1, 100")]
pub result: ::core::option::Option<restore_reply::Result>,
}
pub mod restore_reply {
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
pub enum Result {
#[prost(message, tag = "1")]
Empty(()),
#[prost(message, tag = "100")]
Error(super::Error),
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct RestoreAndRunRequest {
#[prost(bytes = "vec", tag = "1")]
pub state: ::prost::alloc::vec::Vec<u8>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct RestoreAndRunReply {
#[prost(oneof = "restore_and_run_reply::Result", tags = "1, 100")]
pub result: ::core::option::Option<restore_and_run_reply::Result>,
}
pub mod restore_and_run_reply {
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
pub enum Result {
#[prost(message, tag = "1")]
Time(::prost_types::Timestamp),
#[prost(message, tag = "100")]
Error(super::Error),
}
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct TerminateRequest {}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct TerminateReply {
#[prost(oneof = "terminate_reply::Result", tags = "1, 100")]
pub result: ::core::option::Option<terminate_reply::Result>,
}
pub mod terminate_reply {
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
pub enum Result {
#[prost(message, tag = "1")]
Empty(()),
#[prost(message, tag = "100")]
Error(super::Error),
}
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct HaltRequest {}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct HaltReply {
#[prost(oneof = "halt_reply::Result", tags = "1, 100")]
pub result: ::core::option::Option<halt_reply::Result>,
}
pub mod halt_reply {
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
pub enum Result {
#[prost(message, tag = "1")]
Empty(()),
#[prost(message, tag = "100")]
Error(super::Error),
}
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SaveRequest {}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SaveReply {
#[prost(oneof = "save_reply::Result", tags = "1, 100")]
pub result: ::core::option::Option<save_reply::Result>,
}
pub mod save_reply {
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
pub enum Result {
#[prost(bytes, tag = "1")]
State(::prost::alloc::vec::Vec<u8>),
#[prost(message, tag = "100")]
Error(super::Error),
}
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct TimeRequest {}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct TimeReply {
#[prost(oneof = "time_reply::Result", tags = "1, 100")]
pub result: ::core::option::Option<time_reply::Result>,
}
pub mod time_reply {
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
pub enum Result {
#[prost(message, tag = "1")]
Time(::prost_types::Timestamp),
#[prost(message, tag = "100")]
Error(super::Error),
}
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct StepRequest {}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct StepReply {
#[prost(oneof = "step_reply::Result", tags = "1, 100")]
pub result: ::core::option::Option<step_reply::Result>,
}
pub mod step_reply {
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
pub enum Result {
#[prost(message, tag = "1")]
Time(::prost_types::Timestamp),
#[prost(message, tag = "100")]
Error(super::Error),
}
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct StepUntilRequest {
#[prost(oneof = "step_until_request::Deadline", tags = "1, 2")]
pub deadline: ::core::option::Option<step_until_request::Deadline>,
}
pub mod step_until_request {
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Oneof)]
pub enum Deadline {
#[prost(message, tag = "1")]
Time(::prost_types::Timestamp),
#[prost(message, tag = "2")]
Duration(::prost_types::Duration),
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct StepUntilReply {
#[prost(oneof = "step_until_reply::Result", tags = "1, 100")]
pub result: ::core::option::Option<step_until_reply::Result>,
}
pub mod step_until_reply {
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
pub enum Result {
#[prost(message, tag = "1")]
Time(::prost_types::Timestamp),
#[prost(message, tag = "100")]
Error(super::Error),
}
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct RunRequest {}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct RunReply {
#[prost(oneof = "run_reply::Result", tags = "1, 100")]
pub result: ::core::option::Option<run_reply::Result>,
}
pub mod run_reply {
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
pub enum Result {
#[prost(message, tag = "1")]
Time(::prost_types::Timestamp),
#[prost(message, tag = "100")]
Error(super::Error),
}
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListEventSourcesRequest {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListEventSourcesReply {
#[prost(message, repeated, tag = "1")]
pub sources: ::prost::alloc::vec::Vec<Path>,
#[prost(oneof = "list_event_sources_reply::Result", tags = "10, 100")]
pub result: ::core::option::Option<list_event_sources_reply::Result>,
}
pub mod list_event_sources_reply {
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
pub enum Result {
#[prost(message, tag = "10")]
Empty(()),
#[prost(message, tag = "100")]
Error(super::Error),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetEventSourceSchemasRequest {
#[prost(message, repeated, tag = "1")]
pub sources: ::prost::alloc::vec::Vec<Path>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetEventSourceSchemasReply {
#[prost(message, repeated, tag = "1")]
pub schemas: ::prost::alloc::vec::Vec<EventSourceSchema>,
#[prost(oneof = "get_event_source_schemas_reply::Result", tags = "10, 100")]
pub result: ::core::option::Option<get_event_source_schemas_reply::Result>,
}
pub mod get_event_source_schemas_reply {
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
pub enum Result {
#[prost(message, tag = "10")]
Empty(()),
#[prost(message, tag = "100")]
Error(super::Error),
}
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListQuerySourcesRequest {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListQuerySourcesReply {
#[prost(message, repeated, tag = "1")]
pub sources: ::prost::alloc::vec::Vec<Path>,
#[prost(oneof = "list_query_sources_reply::Result", tags = "10, 100")]
pub result: ::core::option::Option<list_query_sources_reply::Result>,
}
pub mod list_query_sources_reply {
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
pub enum Result {
#[prost(message, tag = "10")]
Empty(()),
#[prost(message, tag = "100")]
Error(super::Error),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetQuerySourceSchemasRequest {
#[prost(message, repeated, tag = "1")]
pub sources: ::prost::alloc::vec::Vec<Path>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetQuerySourceSchemasReply {
#[prost(message, repeated, tag = "1")]
pub schemas: ::prost::alloc::vec::Vec<QuerySourceSchema>,
#[prost(oneof = "get_query_source_schemas_reply::Result", tags = "10, 100")]
pub result: ::core::option::Option<get_query_source_schemas_reply::Result>,
}
pub mod get_query_source_schemas_reply {
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
pub enum Result {
#[prost(message, tag = "10")]
Empty(()),
#[prost(message, tag = "100")]
Error(super::Error),
}
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListEventSinksRequest {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListEventSinksReply {
#[prost(message, repeated, tag = "1")]
pub sinks: ::prost::alloc::vec::Vec<Path>,
#[prost(oneof = "list_event_sinks_reply::Result", tags = "10, 100")]
pub result: ::core::option::Option<list_event_sinks_reply::Result>,
}
pub mod list_event_sinks_reply {
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
pub enum Result {
#[prost(message, tag = "10")]
Empty(()),
#[prost(message, tag = "100")]
Error(super::Error),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetEventSinkSchemasRequest {
#[prost(message, repeated, tag = "1")]
pub sinks: ::prost::alloc::vec::Vec<Path>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetEventSinkSchemasReply {
#[prost(message, repeated, tag = "1")]
pub schemas: ::prost::alloc::vec::Vec<EventSinkSchema>,
#[prost(oneof = "get_event_sink_schemas_reply::Result", tags = "10, 100")]
pub result: ::core::option::Option<get_event_sink_schemas_reply::Result>,
}
pub mod get_event_sink_schemas_reply {
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
pub enum Result {
#[prost(message, tag = "10")]
Empty(()),
#[prost(message, tag = "100")]
Error(super::Error),
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct InjectEventRequest {
#[prost(message, optional, tag = "3")]
pub source: ::core::option::Option<Path>,
#[prost(bytes = "vec", tag = "4")]
pub event: ::prost::alloc::vec::Vec<u8>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct InjectEventReply {
#[prost(oneof = "inject_event_reply::Result", tags = "1, 100")]
pub result: ::core::option::Option<inject_event_reply::Result>,
}
pub mod inject_event_reply {
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
pub enum Result {
#[prost(message, tag = "1")]
Empty(()),
#[prost(message, tag = "100")]
Error(super::Error),
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ScheduleEventRequest {
#[prost(message, optional, tag = "3")]
pub source: ::core::option::Option<Path>,
#[prost(bytes = "vec", tag = "4")]
pub event: ::prost::alloc::vec::Vec<u8>,
#[prost(message, optional, tag = "5")]
pub period: ::core::option::Option<::prost_types::Duration>,
#[prost(bool, tag = "6")]
pub with_key: bool,
#[prost(oneof = "schedule_event_request::Deadline", tags = "1, 2")]
pub deadline: ::core::option::Option<schedule_event_request::Deadline>,
}
pub mod schedule_event_request {
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Oneof)]
pub enum Deadline {
#[prost(message, tag = "1")]
Time(::prost_types::Timestamp),
#[prost(message, tag = "2")]
Duration(::prost_types::Duration),
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ScheduleEventReply {
#[prost(oneof = "schedule_event_reply::Result", tags = "1, 2, 100")]
pub result: ::core::option::Option<schedule_event_reply::Result>,
}
pub mod schedule_event_reply {
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
pub enum Result {
#[prost(message, tag = "1")]
Empty(()),
#[prost(message, tag = "2")]
Key(super::EventKey),
#[prost(message, tag = "100")]
Error(super::Error),
}
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CancelEventRequest {
#[prost(message, optional, tag = "1")]
pub key: ::core::option::Option<EventKey>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CancelEventReply {
#[prost(oneof = "cancel_event_reply::Result", tags = "1, 100")]
pub result: ::core::option::Option<cancel_event_reply::Result>,
}
pub mod cancel_event_reply {
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
pub enum Result {
#[prost(message, tag = "1")]
Empty(()),
#[prost(message, tag = "100")]
Error(super::Error),
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ProcessEventRequest {
#[prost(message, optional, tag = "1")]
pub source: ::core::option::Option<Path>,
#[prost(bytes = "vec", tag = "2")]
pub event: ::prost::alloc::vec::Vec<u8>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ProcessEventReply {
#[prost(oneof = "process_event_reply::Result", tags = "1, 100")]
pub result: ::core::option::Option<process_event_reply::Result>,
}
pub mod process_event_reply {
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
pub enum Result {
#[prost(message, tag = "1")]
Empty(()),
#[prost(message, tag = "100")]
Error(super::Error),
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ProcessQueryRequest {
#[prost(message, optional, tag = "1")]
pub source: ::core::option::Option<Path>,
#[prost(bytes = "vec", tag = "2")]
pub request: ::prost::alloc::vec::Vec<u8>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ProcessQueryReply {
#[prost(bytes = "vec", repeated, tag = "1")]
pub replies: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
#[prost(oneof = "process_query_reply::Result", tags = "10, 100")]
pub result: ::core::option::Option<process_query_reply::Result>,
}
pub mod process_query_reply {
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
pub enum Result {
#[prost(message, tag = "10")]
Empty(()),
#[prost(message, tag = "100")]
Error(super::Error),
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct TryReadEventsRequest {
#[prost(message, optional, tag = "1")]
pub sink: ::core::option::Option<Path>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct TryReadEventsReply {
#[prost(bytes = "vec", repeated, tag = "1")]
pub events: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
#[prost(oneof = "try_read_events_reply::Result", tags = "10, 100")]
pub result: ::core::option::Option<try_read_events_reply::Result>,
}
pub mod try_read_events_reply {
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
pub enum Result {
#[prost(message, tag = "10")]
Empty(()),
#[prost(message, tag = "100")]
Error(super::Error),
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ReadEventRequest {
#[prost(message, optional, tag = "1")]
pub sink: ::core::option::Option<Path>,
#[prost(message, optional, tag = "2")]
pub timeout: ::core::option::Option<::prost_types::Duration>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ReadEventReply {
#[prost(oneof = "read_event_reply::Result", tags = "1, 100")]
pub result: ::core::option::Option<read_event_reply::Result>,
}
pub mod read_event_reply {
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
pub enum Result {
#[prost(bytes, tag = "1")]
Event(::prost::alloc::vec::Vec<u8>),
#[prost(message, tag = "100")]
Error(super::Error),
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct EnableSinkRequest {
#[prost(message, optional, tag = "1")]
pub sink: ::core::option::Option<Path>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct EnableSinkReply {
#[prost(oneof = "enable_sink_reply::Result", tags = "10, 100")]
pub result: ::core::option::Option<enable_sink_reply::Result>,
}
pub mod enable_sink_reply {
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
pub enum Result {
#[prost(message, tag = "10")]
Empty(()),
#[prost(message, tag = "100")]
Error(super::Error),
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DisableSinkRequest {
#[prost(message, optional, tag = "1")]
pub sink: ::core::option::Option<Path>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DisableSinkReply {
#[prost(oneof = "disable_sink_reply::Result", tags = "10, 100")]
pub result: ::core::option::Option<disable_sink_reply::Result>,
}
pub mod disable_sink_reply {
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
pub enum Result {
#[prost(message, tag = "10")]
Empty(()),
#[prost(message, tag = "100")]
Error(super::Error),
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ErrorCode {
InternalError = 0,
MissingArgument = 1,
InvalidTime = 2,
InvalidPeriod = 3,
InvalidDeadline = 4,
InvalidMessage = 5,
InvalidKey = 6,
InvalidTimeout = 7,
BenchPanic = 20,
BenchError = 21,
BenchNotBuilt = 22,
DuplicateEventSource = 23,
DuplicateQuerySource = 24,
DuplicateEventSink = 25,
InvalidBenchConfig = 26,
SimulationPanic = 40,
SimulationNotStarted = 42,
SimulationTerminated = 43,
SimulationDeadlock = 44,
SimulationMessageLoss = 45,
SimulationNoRecipient = 46,
SimulationTimeout = 47,
SimulationOutOfSync = 48,
SimulationBadQuery = 49,
SimulationTimeOutOfRange = 50,
EventSourceNotFound = 60,
QuerySourceNotFound = 61,
SinkNotFound = 62,
SinkTerminated = 63,
SinkReadRace = 64,
SinkReadTimeout = 65,
InvalidEventType = 66,
InvalidQueryType = 67,
SaveError = 80,
RestoreError = 81,
}
impl ErrorCode {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::InternalError => "INTERNAL_ERROR",
Self::MissingArgument => "MISSING_ARGUMENT",
Self::InvalidTime => "INVALID_TIME",
Self::InvalidPeriod => "INVALID_PERIOD",
Self::InvalidDeadline => "INVALID_DEADLINE",
Self::InvalidMessage => "INVALID_MESSAGE",
Self::InvalidKey => "INVALID_KEY",
Self::InvalidTimeout => "INVALID_TIMEOUT",
Self::BenchPanic => "BENCH_PANIC",
Self::BenchError => "BENCH_ERROR",
Self::BenchNotBuilt => "BENCH_NOT_BUILT",
Self::DuplicateEventSource => "DUPLICATE_EVENT_SOURCE",
Self::DuplicateQuerySource => "DUPLICATE_QUERY_SOURCE",
Self::DuplicateEventSink => "DUPLICATE_EVENT_SINK",
Self::InvalidBenchConfig => "INVALID_BENCH_CONFIG",
Self::SimulationPanic => "SIMULATION_PANIC",
Self::SimulationNotStarted => "SIMULATION_NOT_STARTED",
Self::SimulationTerminated => "SIMULATION_TERMINATED",
Self::SimulationDeadlock => "SIMULATION_DEADLOCK",
Self::SimulationMessageLoss => "SIMULATION_MESSAGE_LOSS",
Self::SimulationNoRecipient => "SIMULATION_NO_RECIPIENT",
Self::SimulationTimeout => "SIMULATION_TIMEOUT",
Self::SimulationOutOfSync => "SIMULATION_OUT_OF_SYNC",
Self::SimulationBadQuery => "SIMULATION_BAD_QUERY",
Self::SimulationTimeOutOfRange => "SIMULATION_TIME_OUT_OF_RANGE",
Self::EventSourceNotFound => "EVENT_SOURCE_NOT_FOUND",
Self::QuerySourceNotFound => "QUERY_SOURCE_NOT_FOUND",
Self::SinkNotFound => "SINK_NOT_FOUND",
Self::SinkTerminated => "SINK_TERMINATED",
Self::SinkReadRace => "SINK_READ_RACE",
Self::SinkReadTimeout => "SINK_READ_TIMEOUT",
Self::InvalidEventType => "INVALID_EVENT_TYPE",
Self::InvalidQueryType => "INVALID_QUERY_TYPE",
Self::SaveError => "SAVE_ERROR",
Self::RestoreError => "RESTORE_ERROR",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"INTERNAL_ERROR" => Some(Self::InternalError),
"MISSING_ARGUMENT" => Some(Self::MissingArgument),
"INVALID_TIME" => Some(Self::InvalidTime),
"INVALID_PERIOD" => Some(Self::InvalidPeriod),
"INVALID_DEADLINE" => Some(Self::InvalidDeadline),
"INVALID_MESSAGE" => Some(Self::InvalidMessage),
"INVALID_KEY" => Some(Self::InvalidKey),
"INVALID_TIMEOUT" => Some(Self::InvalidTimeout),
"BENCH_PANIC" => Some(Self::BenchPanic),
"BENCH_ERROR" => Some(Self::BenchError),
"BENCH_NOT_BUILT" => Some(Self::BenchNotBuilt),
"DUPLICATE_EVENT_SOURCE" => Some(Self::DuplicateEventSource),
"DUPLICATE_QUERY_SOURCE" => Some(Self::DuplicateQuerySource),
"DUPLICATE_EVENT_SINK" => Some(Self::DuplicateEventSink),
"INVALID_BENCH_CONFIG" => Some(Self::InvalidBenchConfig),
"SIMULATION_PANIC" => Some(Self::SimulationPanic),
"SIMULATION_NOT_STARTED" => Some(Self::SimulationNotStarted),
"SIMULATION_TERMINATED" => Some(Self::SimulationTerminated),
"SIMULATION_DEADLOCK" => Some(Self::SimulationDeadlock),
"SIMULATION_MESSAGE_LOSS" => Some(Self::SimulationMessageLoss),
"SIMULATION_NO_RECIPIENT" => Some(Self::SimulationNoRecipient),
"SIMULATION_TIMEOUT" => Some(Self::SimulationTimeout),
"SIMULATION_OUT_OF_SYNC" => Some(Self::SimulationOutOfSync),
"SIMULATION_BAD_QUERY" => Some(Self::SimulationBadQuery),
"SIMULATION_TIME_OUT_OF_RANGE" => Some(Self::SimulationTimeOutOfRange),
"EVENT_SOURCE_NOT_FOUND" => Some(Self::EventSourceNotFound),
"QUERY_SOURCE_NOT_FOUND" => Some(Self::QuerySourceNotFound),
"SINK_NOT_FOUND" => Some(Self::SinkNotFound),
"SINK_TERMINATED" => Some(Self::SinkTerminated),
"SINK_READ_RACE" => Some(Self::SinkReadRace),
"SINK_READ_TIMEOUT" => Some(Self::SinkReadTimeout),
"INVALID_EVENT_TYPE" => Some(Self::InvalidEventType),
"INVALID_QUERY_TYPE" => Some(Self::InvalidQueryType),
"SAVE_ERROR" => Some(Self::SaveError),
"RESTORE_ERROR" => Some(Self::RestoreError),
_ => None,
}
}
}
pub mod simulation_server {
#![allow(
unused_variables,
dead_code,
missing_docs,
clippy::wildcard_imports,
clippy::let_unit_value,
)]
use tonic::codegen::*;
#[async_trait]
pub trait Simulation: std::marker::Send + std::marker::Sync + 'static {
async fn build(
&self,
request: tonic::Request<super::BuildRequest>,
) -> std::result::Result<tonic::Response<super::BuildReply>, tonic::Status>;
async fn init(
&self,
request: tonic::Request<super::InitRequest>,
) -> std::result::Result<tonic::Response<super::InitReply>, tonic::Status>;
async fn init_and_run(
&self,
request: tonic::Request<super::InitAndRunRequest>,
) -> std::result::Result<tonic::Response<super::InitAndRunReply>, tonic::Status>;
async fn halt(
&self,
request: tonic::Request<super::HaltRequest>,
) -> std::result::Result<tonic::Response<super::HaltReply>, tonic::Status>;
async fn terminate(
&self,
request: tonic::Request<super::TerminateRequest>,
) -> std::result::Result<tonic::Response<super::TerminateReply>, tonic::Status>;
async fn save(
&self,
request: tonic::Request<super::SaveRequest>,
) -> std::result::Result<tonic::Response<super::SaveReply>, tonic::Status>;
async fn restore(
&self,
request: tonic::Request<super::RestoreRequest>,
) -> std::result::Result<tonic::Response<super::RestoreReply>, tonic::Status>;
async fn restore_and_run(
&self,
request: tonic::Request<super::RestoreAndRunRequest>,
) -> std::result::Result<
tonic::Response<super::RestoreAndRunReply>,
tonic::Status,
>;
async fn time(
&self,
request: tonic::Request<super::TimeRequest>,
) -> std::result::Result<tonic::Response<super::TimeReply>, tonic::Status>;
async fn step(
&self,
request: tonic::Request<super::StepRequest>,
) -> std::result::Result<tonic::Response<super::StepReply>, tonic::Status>;
async fn step_until(
&self,
request: tonic::Request<super::StepUntilRequest>,
) -> std::result::Result<tonic::Response<super::StepUntilReply>, tonic::Status>;
async fn run(
&self,
request: tonic::Request<super::RunRequest>,
) -> std::result::Result<tonic::Response<super::RunReply>, tonic::Status>;
async fn list_event_sources(
&self,
request: tonic::Request<super::ListEventSourcesRequest>,
) -> std::result::Result<
tonic::Response<super::ListEventSourcesReply>,
tonic::Status,
>;
async fn get_event_source_schemas(
&self,
request: tonic::Request<super::GetEventSourceSchemasRequest>,
) -> std::result::Result<
tonic::Response<super::GetEventSourceSchemasReply>,
tonic::Status,
>;
async fn list_query_sources(
&self,
request: tonic::Request<super::ListQuerySourcesRequest>,
) -> std::result::Result<
tonic::Response<super::ListQuerySourcesReply>,
tonic::Status,
>;
async fn get_query_source_schemas(
&self,
request: tonic::Request<super::GetQuerySourceSchemasRequest>,
) -> std::result::Result<
tonic::Response<super::GetQuerySourceSchemasReply>,
tonic::Status,
>;
async fn list_event_sinks(
&self,
request: tonic::Request<super::ListEventSinksRequest>,
) -> std::result::Result<
tonic::Response<super::ListEventSinksReply>,
tonic::Status,
>;
async fn get_event_sink_schemas(
&self,
request: tonic::Request<super::GetEventSinkSchemasRequest>,
) -> std::result::Result<
tonic::Response<super::GetEventSinkSchemasReply>,
tonic::Status,
>;
async fn inject_event(
&self,
request: tonic::Request<super::InjectEventRequest>,
) -> std::result::Result<
tonic::Response<super::InjectEventReply>,
tonic::Status,
>;
async fn schedule_event(
&self,
request: tonic::Request<super::ScheduleEventRequest>,
) -> std::result::Result<
tonic::Response<super::ScheduleEventReply>,
tonic::Status,
>;
async fn cancel_event(
&self,
request: tonic::Request<super::CancelEventRequest>,
) -> std::result::Result<
tonic::Response<super::CancelEventReply>,
tonic::Status,
>;
async fn process_event(
&self,
request: tonic::Request<super::ProcessEventRequest>,
) -> std::result::Result<
tonic::Response<super::ProcessEventReply>,
tonic::Status,
>;
async fn process_query(
&self,
request: tonic::Request<super::ProcessQueryRequest>,
) -> std::result::Result<
tonic::Response<super::ProcessQueryReply>,
tonic::Status,
>;
async fn try_read_events(
&self,
request: tonic::Request<super::TryReadEventsRequest>,
) -> std::result::Result<
tonic::Response<super::TryReadEventsReply>,
tonic::Status,
>;
async fn read_event(
&self,
request: tonic::Request<super::ReadEventRequest>,
) -> std::result::Result<tonic::Response<super::ReadEventReply>, tonic::Status>;
async fn enable_sink(
&self,
request: tonic::Request<super::EnableSinkRequest>,
) -> std::result::Result<tonic::Response<super::EnableSinkReply>, tonic::Status>;
async fn disable_sink(
&self,
request: tonic::Request<super::DisableSinkRequest>,
) -> std::result::Result<
tonic::Response<super::DisableSinkReply>,
tonic::Status,
>;
}
#[derive(Debug)]
pub struct SimulationServer<T> {
inner: Arc<T>,
accept_compression_encodings: EnabledCompressionEncodings,
send_compression_encodings: EnabledCompressionEncodings,
max_decoding_message_size: Option<usize>,
max_encoding_message_size: Option<usize>,
}
impl<T> SimulationServer<T> {
pub fn new(inner: T) -> Self {
Self::from_arc(Arc::new(inner))
}
pub fn from_arc(inner: Arc<T>) -> Self {
Self {
inner,
accept_compression_encodings: Default::default(),
send_compression_encodings: Default::default(),
max_decoding_message_size: None,
max_encoding_message_size: None,
}
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> InterceptedService<Self, F>
where
F: tonic::service::Interceptor,
{
InterceptedService::new(Self::new(inner), interceptor)
}
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.accept_compression_encodings.enable(encoding);
self
}
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.send_compression_encodings.enable(encoding);
self
}
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.max_decoding_message_size = Some(limit);
self
}
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.max_encoding_message_size = Some(limit);
self
}
}
impl<T, B> tonic::codegen::Service<http::Request<B>> for SimulationServer<T>
where
T: Simulation,
B: Body + std::marker::Send + 'static,
B::Error: Into<StdError> + std::marker::Send + 'static,
{
type Response = http::Response<tonic::body::Body>;
type Error = std::convert::Infallible;
type Future = BoxFuture<Self::Response, Self::Error>;
fn poll_ready(
&mut self,
_cx: &mut Context<'_>,
) -> Poll<std::result::Result<(), Self::Error>> {
Poll::Ready(Ok(()))
}
fn call(&mut self, req: http::Request<B>) -> Self::Future {
match req.uri().path() {
"/simulation.v1.Simulation/Build" => {
#[allow(non_camel_case_types)]
struct BuildSvc<T: Simulation>(pub Arc<T>);
impl<T: Simulation> tonic::server::UnaryService<super::BuildRequest>
for BuildSvc<T> {
type Response = super::BuildReply;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::BuildRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Simulation>::build(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = BuildSvc(inner);
let codec = tonic_prost::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/simulation.v1.Simulation/Init" => {
#[allow(non_camel_case_types)]
struct InitSvc<T: Simulation>(pub Arc<T>);
impl<T: Simulation> tonic::server::UnaryService<super::InitRequest>
for InitSvc<T> {
type Response = super::InitReply;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::InitRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Simulation>::init(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = InitSvc(inner);
let codec = tonic_prost::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/simulation.v1.Simulation/InitAndRun" => {
#[allow(non_camel_case_types)]
struct InitAndRunSvc<T: Simulation>(pub Arc<T>);
impl<
T: Simulation,
> tonic::server::UnaryService<super::InitAndRunRequest>
for InitAndRunSvc<T> {
type Response = super::InitAndRunReply;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::InitAndRunRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Simulation>::init_and_run(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = InitAndRunSvc(inner);
let codec = tonic_prost::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/simulation.v1.Simulation/Halt" => {
#[allow(non_camel_case_types)]
struct HaltSvc<T: Simulation>(pub Arc<T>);
impl<T: Simulation> tonic::server::UnaryService<super::HaltRequest>
for HaltSvc<T> {
type Response = super::HaltReply;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::HaltRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Simulation>::halt(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = HaltSvc(inner);
let codec = tonic_prost::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/simulation.v1.Simulation/Terminate" => {
#[allow(non_camel_case_types)]
struct TerminateSvc<T: Simulation>(pub Arc<T>);
impl<
T: Simulation,
> tonic::server::UnaryService<super::TerminateRequest>
for TerminateSvc<T> {
type Response = super::TerminateReply;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::TerminateRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Simulation>::terminate(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = TerminateSvc(inner);
let codec = tonic_prost::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/simulation.v1.Simulation/Save" => {
#[allow(non_camel_case_types)]
struct SaveSvc<T: Simulation>(pub Arc<T>);
impl<T: Simulation> tonic::server::UnaryService<super::SaveRequest>
for SaveSvc<T> {
type Response = super::SaveReply;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::SaveRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Simulation>::save(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = SaveSvc(inner);
let codec = tonic_prost::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/simulation.v1.Simulation/Restore" => {
#[allow(non_camel_case_types)]
struct RestoreSvc<T: Simulation>(pub Arc<T>);
impl<
T: Simulation,
> tonic::server::UnaryService<super::RestoreRequest>
for RestoreSvc<T> {
type Response = super::RestoreReply;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::RestoreRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Simulation>::restore(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = RestoreSvc(inner);
let codec = tonic_prost::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/simulation.v1.Simulation/RestoreAndRun" => {
#[allow(non_camel_case_types)]
struct RestoreAndRunSvc<T: Simulation>(pub Arc<T>);
impl<
T: Simulation,
> tonic::server::UnaryService<super::RestoreAndRunRequest>
for RestoreAndRunSvc<T> {
type Response = super::RestoreAndRunReply;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::RestoreAndRunRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Simulation>::restore_and_run(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = RestoreAndRunSvc(inner);
let codec = tonic_prost::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/simulation.v1.Simulation/Time" => {
#[allow(non_camel_case_types)]
struct TimeSvc<T: Simulation>(pub Arc<T>);
impl<T: Simulation> tonic::server::UnaryService<super::TimeRequest>
for TimeSvc<T> {
type Response = super::TimeReply;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::TimeRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Simulation>::time(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = TimeSvc(inner);
let codec = tonic_prost::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/simulation.v1.Simulation/Step" => {
#[allow(non_camel_case_types)]
struct StepSvc<T: Simulation>(pub Arc<T>);
impl<T: Simulation> tonic::server::UnaryService<super::StepRequest>
for StepSvc<T> {
type Response = super::StepReply;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::StepRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Simulation>::step(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = StepSvc(inner);
let codec = tonic_prost::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/simulation.v1.Simulation/StepUntil" => {
#[allow(non_camel_case_types)]
struct StepUntilSvc<T: Simulation>(pub Arc<T>);
impl<
T: Simulation,
> tonic::server::UnaryService<super::StepUntilRequest>
for StepUntilSvc<T> {
type Response = super::StepUntilReply;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::StepUntilRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Simulation>::step_until(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = StepUntilSvc(inner);
let codec = tonic_prost::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/simulation.v1.Simulation/Run" => {
#[allow(non_camel_case_types)]
struct RunSvc<T: Simulation>(pub Arc<T>);
impl<T: Simulation> tonic::server::UnaryService<super::RunRequest>
for RunSvc<T> {
type Response = super::RunReply;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::RunRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Simulation>::run(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = RunSvc(inner);
let codec = tonic_prost::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/simulation.v1.Simulation/ListEventSources" => {
#[allow(non_camel_case_types)]
struct ListEventSourcesSvc<T: Simulation>(pub Arc<T>);
impl<
T: Simulation,
> tonic::server::UnaryService<super::ListEventSourcesRequest>
for ListEventSourcesSvc<T> {
type Response = super::ListEventSourcesReply;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::ListEventSourcesRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Simulation>::list_event_sources(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = ListEventSourcesSvc(inner);
let codec = tonic_prost::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/simulation.v1.Simulation/GetEventSourceSchemas" => {
#[allow(non_camel_case_types)]
struct GetEventSourceSchemasSvc<T: Simulation>(pub Arc<T>);
impl<
T: Simulation,
> tonic::server::UnaryService<super::GetEventSourceSchemasRequest>
for GetEventSourceSchemasSvc<T> {
type Response = super::GetEventSourceSchemasReply;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::GetEventSourceSchemasRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Simulation>::get_event_source_schemas(&inner, request)
.await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = GetEventSourceSchemasSvc(inner);
let codec = tonic_prost::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/simulation.v1.Simulation/ListQuerySources" => {
#[allow(non_camel_case_types)]
struct ListQuerySourcesSvc<T: Simulation>(pub Arc<T>);
impl<
T: Simulation,
> tonic::server::UnaryService<super::ListQuerySourcesRequest>
for ListQuerySourcesSvc<T> {
type Response = super::ListQuerySourcesReply;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::ListQuerySourcesRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Simulation>::list_query_sources(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = ListQuerySourcesSvc(inner);
let codec = tonic_prost::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/simulation.v1.Simulation/GetQuerySourceSchemas" => {
#[allow(non_camel_case_types)]
struct GetQuerySourceSchemasSvc<T: Simulation>(pub Arc<T>);
impl<
T: Simulation,
> tonic::server::UnaryService<super::GetQuerySourceSchemasRequest>
for GetQuerySourceSchemasSvc<T> {
type Response = super::GetQuerySourceSchemasReply;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::GetQuerySourceSchemasRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Simulation>::get_query_source_schemas(&inner, request)
.await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = GetQuerySourceSchemasSvc(inner);
let codec = tonic_prost::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/simulation.v1.Simulation/ListEventSinks" => {
#[allow(non_camel_case_types)]
struct ListEventSinksSvc<T: Simulation>(pub Arc<T>);
impl<
T: Simulation,
> tonic::server::UnaryService<super::ListEventSinksRequest>
for ListEventSinksSvc<T> {
type Response = super::ListEventSinksReply;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::ListEventSinksRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Simulation>::list_event_sinks(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = ListEventSinksSvc(inner);
let codec = tonic_prost::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/simulation.v1.Simulation/GetEventSinkSchemas" => {
#[allow(non_camel_case_types)]
struct GetEventSinkSchemasSvc<T: Simulation>(pub Arc<T>);
impl<
T: Simulation,
> tonic::server::UnaryService<super::GetEventSinkSchemasRequest>
for GetEventSinkSchemasSvc<T> {
type Response = super::GetEventSinkSchemasReply;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::GetEventSinkSchemasRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Simulation>::get_event_sink_schemas(&inner, request)
.await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = GetEventSinkSchemasSvc(inner);
let codec = tonic_prost::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/simulation.v1.Simulation/InjectEvent" => {
#[allow(non_camel_case_types)]
struct InjectEventSvc<T: Simulation>(pub Arc<T>);
impl<
T: Simulation,
> tonic::server::UnaryService<super::InjectEventRequest>
for InjectEventSvc<T> {
type Response = super::InjectEventReply;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::InjectEventRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Simulation>::inject_event(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = InjectEventSvc(inner);
let codec = tonic_prost::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/simulation.v1.Simulation/ScheduleEvent" => {
#[allow(non_camel_case_types)]
struct ScheduleEventSvc<T: Simulation>(pub Arc<T>);
impl<
T: Simulation,
> tonic::server::UnaryService<super::ScheduleEventRequest>
for ScheduleEventSvc<T> {
type Response = super::ScheduleEventReply;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::ScheduleEventRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Simulation>::schedule_event(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = ScheduleEventSvc(inner);
let codec = tonic_prost::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/simulation.v1.Simulation/CancelEvent" => {
#[allow(non_camel_case_types)]
struct CancelEventSvc<T: Simulation>(pub Arc<T>);
impl<
T: Simulation,
> tonic::server::UnaryService<super::CancelEventRequest>
for CancelEventSvc<T> {
type Response = super::CancelEventReply;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::CancelEventRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Simulation>::cancel_event(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = CancelEventSvc(inner);
let codec = tonic_prost::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/simulation.v1.Simulation/ProcessEvent" => {
#[allow(non_camel_case_types)]
struct ProcessEventSvc<T: Simulation>(pub Arc<T>);
impl<
T: Simulation,
> tonic::server::UnaryService<super::ProcessEventRequest>
for ProcessEventSvc<T> {
type Response = super::ProcessEventReply;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::ProcessEventRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Simulation>::process_event(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = ProcessEventSvc(inner);
let codec = tonic_prost::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/simulation.v1.Simulation/ProcessQuery" => {
#[allow(non_camel_case_types)]
struct ProcessQuerySvc<T: Simulation>(pub Arc<T>);
impl<
T: Simulation,
> tonic::server::UnaryService<super::ProcessQueryRequest>
for ProcessQuerySvc<T> {
type Response = super::ProcessQueryReply;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::ProcessQueryRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Simulation>::process_query(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = ProcessQuerySvc(inner);
let codec = tonic_prost::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/simulation.v1.Simulation/TryReadEvents" => {
#[allow(non_camel_case_types)]
struct TryReadEventsSvc<T: Simulation>(pub Arc<T>);
impl<
T: Simulation,
> tonic::server::UnaryService<super::TryReadEventsRequest>
for TryReadEventsSvc<T> {
type Response = super::TryReadEventsReply;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::TryReadEventsRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Simulation>::try_read_events(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = TryReadEventsSvc(inner);
let codec = tonic_prost::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/simulation.v1.Simulation/ReadEvent" => {
#[allow(non_camel_case_types)]
struct ReadEventSvc<T: Simulation>(pub Arc<T>);
impl<
T: Simulation,
> tonic::server::UnaryService<super::ReadEventRequest>
for ReadEventSvc<T> {
type Response = super::ReadEventReply;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::ReadEventRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Simulation>::read_event(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = ReadEventSvc(inner);
let codec = tonic_prost::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/simulation.v1.Simulation/EnableSink" => {
#[allow(non_camel_case_types)]
struct EnableSinkSvc<T: Simulation>(pub Arc<T>);
impl<
T: Simulation,
> tonic::server::UnaryService<super::EnableSinkRequest>
for EnableSinkSvc<T> {
type Response = super::EnableSinkReply;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::EnableSinkRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Simulation>::enable_sink(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = EnableSinkSvc(inner);
let codec = tonic_prost::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/simulation.v1.Simulation/DisableSink" => {
#[allow(non_camel_case_types)]
struct DisableSinkSvc<T: Simulation>(pub Arc<T>);
impl<
T: Simulation,
> tonic::server::UnaryService<super::DisableSinkRequest>
for DisableSinkSvc<T> {
type Response = super::DisableSinkReply;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::DisableSinkRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Simulation>::disable_sink(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = DisableSinkSvc(inner);
let codec = tonic_prost::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
_ => {
Box::pin(async move {
let mut response = http::Response::new(
tonic::body::Body::default(),
);
let headers = response.headers_mut();
headers
.insert(
tonic::Status::GRPC_STATUS,
(tonic::Code::Unimplemented as i32).into(),
);
headers
.insert(
http::header::CONTENT_TYPE,
tonic::metadata::GRPC_CONTENT_TYPE,
);
Ok(response)
})
}
}
}
}
impl<T> Clone for SimulationServer<T> {
fn clone(&self) -> Self {
let inner = self.inner.clone();
Self {
inner,
accept_compression_encodings: self.accept_compression_encodings,
send_compression_encodings: self.send_compression_encodings,
max_decoding_message_size: self.max_decoding_message_size,
max_encoding_message_size: self.max_encoding_message_size,
}
}
}
pub const SERVICE_NAME: &str = "simulation.v1.Simulation";
impl<T> tonic::server::NamedService for SimulationServer<T> {
const NAME: &'static str = SERVICE_NAME;
}
}