pub struct GraphManager { /* private fields */ }Implementations§
Source§impl GraphManager
impl GraphManager
pub async fn new() -> Self
Sourcepub fn get_genesis_graph(instance_type: InstanceType) -> Graph<SpecNode, String>
pub fn get_genesis_graph(instance_type: InstanceType) -> Graph<SpecNode, String>
Generates spec graph for the Genesis step
Contains only the minimal required infra components to deploy the Leader node
Sourcepub async fn deploy_genesis_graph(
&self,
graph: &Graph<SpecNode, String>,
) -> Result<(Graph<Node, String>, Option<Vm>), Box<dyn Error>>
pub async fn deploy_genesis_graph( &self, graph: &Graph<SpecNode, String>, ) -> Result<(Graph<Node, String>, Option<Vm>), Box<dyn Error>>
Deploys Genesis graph
Mostly duplicates logic of deploy, but without ECR creation
pub fn get_spec_graph( instance_type: &InstanceType, domain_name: Option<String>, ) -> Graph<SpecNode, String>
Sourcepub async fn deploy_spec_graph(
&self,
graph: &Graph<SpecNode, String>,
) -> Result<(Graph<Node, String>, Option<Vm>, Option<Ecr>), Box<dyn Error>>
pub async fn deploy_spec_graph( &self, graph: &Graph<SpecNode, String>, ) -> Result<(Graph<Node, String>, Option<Vm>, Option<Ecr>), Box<dyn Error>>
Deploy spec graph
Temporarily also returns a list of VMs and optional ECR to be used for user services deployment
Sourcepub async fn deploy(
&self,
graph: &Graph<SpecNode, String>,
) -> Result<Graph<Node, String>, Box<dyn Error>>
pub async fn deploy( &self, graph: &Graph<SpecNode, String>, ) -> Result<Graph<Node, String>, Box<dyn Error>>
Deploy arbitrary graph
Sourcepub async fn destroy(
&self,
graph: &mut Graph<Node, String>,
) -> Result<(), Box<dyn Error>>
pub async fn destroy( &self, graph: &mut Graph<Node, String>, ) -> Result<(), Box<dyn Error>>
Destroys resource graph
Modifies the input graph by deleting all the destroyed nodes.
In case of a resource destruction failure, returns Err and
the remaining resources in graph must be handled accordingly.
Auto Trait Implementations§
impl Freeze for GraphManager
impl !RefUnwindSafe for GraphManager
impl Send for GraphManager
impl Sync for GraphManager
impl Unpin for GraphManager
impl !UnwindSafe for GraphManager
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.