parent
a9adeb2d8a
commit
60e0b82247
|
@ -2010,6 +2010,17 @@ version = "0.6.22"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "b5eb417147ba9860a96cfe72a0b93bf88fee1744b5636ec99ab20c1aa9376581"
|
checksum = "b5eb417147ba9860a96cfe72a0b93bf88fee1744b5636ec99ab20c1aa9376581"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "reldata"
|
||||||
|
version = "0.1.0"
|
||||||
|
dependencies = [
|
||||||
|
"async-std",
|
||||||
|
"log",
|
||||||
|
"otto-models",
|
||||||
|
"pretty_env_logger 0.4.0",
|
||||||
|
"tide 0.15.1",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "remove_dir_all"
|
name = "remove_dir_all"
|
||||||
version = "0.5.3"
|
version = "0.5.3"
|
||||||
|
|
|
@ -13,6 +13,7 @@ members = [
|
||||||
"services/local-orchestrator",
|
"services/local-orchestrator",
|
||||||
"services/object-store",
|
"services/object-store",
|
||||||
"services/parser",
|
"services/parser",
|
||||||
|
"services/reldata",
|
||||||
|
|
||||||
"stdlib/archive",
|
"stdlib/archive",
|
||||||
"stdlib/dir",
|
"stdlib/dir",
|
||||||
|
|
|
@ -9,7 +9,6 @@ This document captures some details around developing these Otto services.
|
||||||
|===
|
|===
|
||||||
| Port | Service Name | Notes
|
| Port | Service Name | Notes
|
||||||
|
|
||||||
|
|
||||||
| 7670
|
| 7670
|
||||||
| Dashboard
|
| Dashboard
|
||||||
| Placeholder for the web dashboard
|
| Placeholder for the web dashboard
|
||||||
|
@ -27,5 +26,9 @@ This document captures some details around developing these Otto services.
|
||||||
| Orchestrator
|
| Orchestrator
|
||||||
| Service which can provision environments capable of executing agents.
|
| Service which can provision environments capable of executing agents.
|
||||||
|
|
||||||
|
| 7674
|
||||||
|
| Relational Data
|
||||||
|
| Service which provides relational data services to clients.
|
||||||
|
|
||||||
|===
|
|===
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
[package]
|
||||||
|
name = "reldata"
|
||||||
|
version = "0.1.0"
|
||||||
|
authors = ["R. Tyler Croy <rtyler@brokenco.de>"]
|
||||||
|
edition = "2018"
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
|
async-std = { version = "~1.7", features = ["attributes"]}
|
||||||
|
log = "~0.4.11"
|
||||||
|
otto-models = { path = "../../crates/models" }
|
||||||
|
pretty_env_logger = "~0.4.0"
|
||||||
|
tide = "~0.15.0"
|
|
@ -0,0 +1,12 @@
|
||||||
|
= Relational Data
|
||||||
|
|
||||||
|
The relational data service provides a centralized location for project,
|
||||||
|
pipeline, and more data to be stored. This is in contrast to the object store
|
||||||
|
which is expected to store large files/objects.
|
||||||
|
|
||||||
|
|
||||||
|
.Environnment Variables
|
||||||
|
|===
|
||||||
|
| Name | Default | Description
|
||||||
|
|
||||||
|
|===
|
|
@ -0,0 +1,30 @@
|
||||||
|
/*
|
||||||
|
* The relational data service largely is meant to expose information from an underlying database
|
||||||
|
*/
|
||||||
|
use tide::Request;
|
||||||
|
|
||||||
|
async fn healthcheck(_req: Request<()>) -> tide::Result {
|
||||||
|
Ok(tide::Response::builder(200)
|
||||||
|
.body("{}")
|
||||||
|
.content_type("application/json")
|
||||||
|
.build())
|
||||||
|
}
|
||||||
|
|
||||||
|
#[async_std::main]
|
||||||
|
async fn main() -> std::io::Result<()> {
|
||||||
|
use std::{env, net::TcpListener, os::unix::io::FromRawFd};
|
||||||
|
pretty_env_logger::init();
|
||||||
|
|
||||||
|
let mut app = tide::new();
|
||||||
|
app.at("/health").get(healthcheck);
|
||||||
|
|
||||||
|
if let Some(fd) = env::var("LISTEN_FD").ok().and_then(|fd| fd.parse().ok()) {
|
||||||
|
app.listen(unsafe { TcpListener::from_raw_fd(fd) }).await?;
|
||||||
|
} else {
|
||||||
|
app.listen("http://localhost:7674").await?;
|
||||||
|
}
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
|
||||||
|
#[cfg(test)]
|
||||||
|
mod tests {}
|
Loading…
Reference in New Issue