pub struct ProjectConfig {Show 13 fields
pub name: String,
pub archetype: Archetype,
pub protocols: Vec<Protocol>,
pub tracing: bool,
pub metrics: bool,
pub gateway: Option<GatewayConfig>,
pub consumer: Option<ConsumerConfig>,
pub producer: Option<ProducerConfig>,
pub bff: Option<BffConfig>,
pub scheduled: Option<ScheduledConfig>,
pub websocket_gateway: Option<WebSocketGatewayConfig>,
pub saga_orchestrator: Option<SagaOrchestratorConfig>,
pub acl: Option<AntiCorruptionLayerConfig>,
}Expand description
Main project configuration
Fields§
§name: StringProject name (used for crate name, directories)
archetype: ArchetypeProject archetype
protocols: Vec<Protocol>Protocols to expose
tracing: boolEnable OpenTelemetry tracing
metrics: boolEnable Prometheus metrics
gateway: Option<GatewayConfig>Gateway-specific configuration
consumer: Option<ConsumerConfig>Consumer-specific configuration
producer: Option<ProducerConfig>Producer-specific configuration
bff: Option<BffConfig>BFF-specific configuration
scheduled: Option<ScheduledConfig>Scheduled jobs configuration
websocket_gateway: Option<WebSocketGatewayConfig>WebSocket gateway configuration
saga_orchestrator: Option<SagaOrchestratorConfig>Saga orchestrator configuration
acl: Option<AntiCorruptionLayerConfig>Anti-corruption layer configuration
Implementations§
Source§impl ProjectConfig
impl ProjectConfig
Sourcepub fn with_archetype(self, archetype: Archetype) -> Self
pub fn with_archetype(self, archetype: Archetype) -> Self
Set the archetype
Sourcepub fn with_protocols(self, protocols: Vec<Protocol>) -> Self
pub fn with_protocols(self, protocols: Vec<Protocol>) -> Self
Set the protocols
Sourcepub fn with_gateway(self, gateway: GatewayConfig) -> Self
pub fn with_gateway(self, gateway: GatewayConfig) -> Self
Set gateway configuration
Sourcepub fn with_consumer(self, consumer: ConsumerConfig) -> Self
pub fn with_consumer(self, consumer: ConsumerConfig) -> Self
Set consumer configuration
Sourcepub fn with_producer(self, producer: ProducerConfig) -> Self
pub fn with_producer(self, producer: ProducerConfig) -> Self
Set producer configuration
Sourcepub fn with_scheduled(self, scheduled: ScheduledConfig) -> Self
pub fn with_scheduled(self, scheduled: ScheduledConfig) -> Self
Set scheduled jobs configuration
Sourcepub fn with_websocket_gateway(self, ws: WebSocketGatewayConfig) -> Self
pub fn with_websocket_gateway(self, ws: WebSocketGatewayConfig) -> Self
Set WebSocket gateway configuration
Sourcepub fn with_saga_orchestrator(self, saga: SagaOrchestratorConfig) -> Self
pub fn with_saga_orchestrator(self, saga: SagaOrchestratorConfig) -> Self
Set saga orchestrator configuration
Sourcepub fn with_acl(self, acl: AntiCorruptionLayerConfig) -> Self
pub fn with_acl(self, acl: AntiCorruptionLayerConfig) -> Self
Set anti-corruption layer configuration
Trait Implementations§
Source§impl Clone for ProjectConfig
impl Clone for ProjectConfig
Source§fn clone(&self) -> ProjectConfig
fn clone(&self) -> ProjectConfig
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ProjectConfig
impl Debug for ProjectConfig
Source§impl Default for ProjectConfig
impl Default for ProjectConfig
Source§impl<'de> Deserialize<'de> for ProjectConfig
impl<'de> Deserialize<'de> for ProjectConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ProjectConfig
impl RefUnwindSafe for ProjectConfig
impl Send for ProjectConfig
impl Sync for ProjectConfig
impl Unpin for ProjectConfig
impl UnwindSafe for ProjectConfig
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)