-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(kubegraph): begin implementation of basic simulation gateway
- Loading branch information
Showing
34 changed files
with
509 additions
and
641 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
use ark_core_k8s::data::Url; | ||
use schemars::JsonSchema; | ||
use serde::{Deserialize, Serialize}; | ||
|
||
use crate::query::NetworkQuery; | ||
|
||
#[derive( | ||
Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Serialize, Deserialize, JsonSchema, | ||
)] | ||
#[serde(rename_all = "camelCase")] | ||
pub struct NetworkConnectorPrometheusSpec { | ||
pub template: NetworkQuery, | ||
pub url: Url, | ||
} | ||
|
||
impl NetworkConnectorPrometheusSpec { | ||
pub const fn name(&self) -> &'static str { | ||
self.template.name() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
use std::path::PathBuf; | ||
|
||
use schemars::JsonSchema; | ||
use serde::{Deserialize, Serialize}; | ||
|
||
use crate::graph::NetworkGraphMetadata; | ||
|
||
#[derive( | ||
Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Serialize, Deserialize, JsonSchema, | ||
)] | ||
#[serde(rename_all = "camelCase")] | ||
pub struct NetworkConnectorSimulationSpec { | ||
#[serde(default)] | ||
pub metadata: NetworkGraphMetadata, | ||
pub path: PathBuf, | ||
|
||
#[serde(default = "NetworkConnectorSimulationSpec::default_key_edges")] | ||
pub key_edges: String, | ||
#[serde(default = "NetworkConnectorSimulationSpec::default_key_nodes")] | ||
pub key_nodes: String, | ||
} | ||
|
||
impl NetworkConnectorSimulationSpec { | ||
fn default_key_edges() -> String { | ||
"edges.csv".into() | ||
} | ||
|
||
fn default_key_nodes() -> String { | ||
"nodes.csv".into() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
use schemars::JsonSchema; | ||
use serde::{Deserialize, Serialize}; | ||
|
||
#[derive( | ||
Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Serialize, Deserialize, JsonSchema, | ||
)] | ||
#[serde(rename_all = "camelCase")] | ||
pub struct NetworkFunctionDummySpec<Filter = String, Script = String> { | ||
pub filter: Filter, | ||
pub script: Script, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.