-
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.
Co-authored-by: Luiz Felipe Gonçalves <[email protected]>
- Loading branch information
Showing
14 changed files
with
30 additions
and
157 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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 |
---|---|---|
|
@@ -40,7 +40,6 @@ | |
text = ''cargo fmt "$@"''; | ||
}) | ||
cargo-nextest | ||
cargo-llvm-cov | ||
|
||
gnumake | ||
|
||
|
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 |
---|---|---|
@@ -1,44 +1,29 @@ | ||
use std::fmt; | ||
|
||
use serde::{Deserialize, Serialize}; | ||
|
||
bty::brand!( | ||
pub type ServiceName = String; | ||
); | ||
|
||
#[derive(Debug, Serialize, Deserialize)] | ||
pub struct NetworkSpec { | ||
/// If `None`, won't expose any port. | ||
pub expose_port: Option<u16>, | ||
pub expose_ports: Vec<u16>, | ||
} | ||
|
||
/// The service domain. | ||
#[derive(Clone, Debug, Serialize, Deserialize, PartialEq, Eq, Hash)] | ||
pub struct ServiceId(pub String); | ||
|
||
/// The service image. | ||
#[derive(Clone, Debug, Serialize, Deserialize, PartialEq, Eq, Hash)] | ||
pub struct ServiceImage(pub String); | ||
|
||
#[derive(Debug, Serialize, Deserialize)] | ||
pub struct ServiceSpec { | ||
pub name: ServiceName, | ||
/// The service domain. | ||
pub id: ServiceId, | ||
pub image: ServiceImage, | ||
pub network: NetworkSpec, | ||
pub scripts: Scripts, | ||
/// Whether this service is visible to the public load balancer. | ||
/// | ||
/// Only for port 80 (HTTP traffic). | ||
pub public: bool, | ||
/// The maximum number of instances that Tucano is allowed to run for this | ||
/// service. | ||
pub concurrency: u32, | ||
} | ||
|
||
#[derive(Serialize, Deserialize)] | ||
pub struct Scripts { | ||
/// The script that is used to build a new instance of this service. | ||
pub build_script: String, | ||
/// The script that is used to run an instance of this service. | ||
pub runtime_script: String, | ||
/// An optional string that is used to remove files associated with this | ||
/// service from a given worker node. | ||
pub teardown_script: Option<String>, | ||
} | ||
|
||
impl fmt::Debug for Scripts { | ||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { | ||
f.debug_struct("Scripts") | ||
.field("build", &"<...>") | ||
.field("runtime", &"<...>") | ||
.field("teardown", &self.teardown_script.as_ref().map(|_| "<...>")) | ||
.finish_non_exhaustive() | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,11 +1 @@ | ||
/// Agent manager. | ||
pub mod agent; | ||
|
||
/// System inspector, used to introspect the system and its nodes. | ||
pub mod inspector; | ||
|
||
/// Configuration manager. | ||
pub mod config; | ||
|
||
/// Deployer. | ||
pub mod deployer; |
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