1use super::*;
2
3#[derive(Debug, Clone, PartialEq, Eq)]
4pub struct OpsModule {
5 name: String,
6 config_namespace: String,
7}
8
9impl OpsModule {
10 pub fn new() -> Self {
11 Self {
12 name: "ops".to_string(),
13 config_namespace: "ops".to_string(),
14 }
15 }
16
17 pub fn planner(
18 &self,
19 runtime: JobsRuntime,
20 manifests: &[ModuleManifest],
21 ) -> Result<OpsPlanner, OpsModelError> {
22 OpsPlanner::new(runtime, OpsCatalog::from_manifests(manifests)?)
23 }
24
25 pub fn name(&self) -> &str {
26 &self.name
27 }
28
29 pub fn config_namespace(&self) -> &str {
30 &self.config_namespace
31 }
32}
33
34impl Default for OpsModule {
35 fn default() -> Self {
36 Self::new()
37 }
38}