orca_core/config/
service.rs1use std::collections::HashMap;
2
3use serde::{Deserialize, Serialize};
4
5use crate::types::{
6 DeployStrategy, PlacementConstraint, Replicas, ResourceLimits, RuntimeKind, VolumeSpec,
7};
8
9#[derive(Debug, Clone, Serialize, Deserialize)]
11pub struct ServicesConfig {
12 pub service: Vec<ServiceConfig>,
13}
14
15#[derive(Debug, Clone, Serialize, Deserialize)]
16pub struct ServiceConfig {
17 pub name: String,
18 #[serde(default)]
19 pub runtime: RuntimeKind,
20 pub image: Option<String>,
22 pub module: Option<String>,
24 #[serde(default)]
25 pub replicas: Replicas,
26 pub port: Option<u16>,
27 pub domain: Option<String>,
28 pub health: Option<String>,
29 #[serde(default)]
30 pub env: HashMap<String, String>,
31 pub resources: Option<ResourceLimits>,
32 pub volume: Option<VolumeSpec>,
33 pub deploy: Option<DeployStrategy>,
34 pub placement: Option<PlacementConstraint>,
35 #[serde(default)]
37 pub triggers: Vec<String>,
38 pub assets: Option<String>,
40}