DockerDeploy

Struct DockerDeploy 

Source
pub struct DockerDeploy { /* private fields */ }
Available on crate features deploy and docker_deploy only.
Expand description

For deploying to a local docker instance

Implementations§

Source§

impl DockerDeploy

Source

pub fn new(network: DockerNetwork) -> Self

Create a new deployment

Source

pub fn add_localhost_docker( &mut self, compilation_options: Option<String>, config: Vec<String>, ) -> DockerDeployProcessSpec

Add an internal docker service to the deployment.

Source

pub fn add_localhost_docker_cluster( &mut self, compilation_options: Option<String>, config: Vec<String>, count: usize, ) -> DockerDeployClusterSpec

Add an internal docker cluster to the deployment.

Source

pub fn add_external(&self, name: String) -> DockerDeployExternalSpec

Add an external process to the deployment.

Source

pub fn get_deployment_instance(&self) -> String

Get the deployment instance from this deployment.

Source

pub async fn provision( &self, nodes: &DeployResult<'_, Self>, ) -> Result<(), Error>

Create docker images.

Source

pub async fn start(&self, nodes: &DeployResult<'_, Self>) -> Result<(), Error>

Start the deployment, tell docker to create containers from the existing provisioned images.

Source

pub async fn stop( &mut self, nodes: &DeployResult<'_, Self>, ) -> Result<(), Error>

Stop the deployment, destroy all containers

Source

pub async fn cleanup( &mut self, nodes: &DeployResult<'_, Self>, ) -> Result<(), Error>

remove containers, images, and networks.

Trait Implementations§

Source§

impl<'a> ClusterSpec<'a, DockerDeploy> for DockerDeployClusterSpec

Source§

fn build( self, id: usize, name_hint: &str, ) -> <DockerDeploy as Deploy<'a>>::Cluster

Available on crate feature build only.
Source§

impl<'a> Deploy<'a> for DockerDeploy

Source§

type InstantiateEnv = DockerDeploy

Available on crate feature build only.
Source§

type Process = DockerDeployProcess

Available on crate feature build only.
Source§

type Cluster = DockerDeployCluster

Available on crate feature build only.
Source§

type External = DockerDeployExternal

Available on crate feature build only.
Source§

type Port = u16

Available on crate feature build only.
Source§

type ExternalRawPort = ()

Available on crate feature build only.
Source§

type Meta = ()

Available on crate feature build only.
Source§

type GraphId = ()

Available on crate feature build only.
Type of ID used to switch between different subgraphs at runtime.
Source§

fn allocate_process_port(process: &Self::Process) -> Self::Port

Available on crate feature build only.
Source§

fn allocate_cluster_port(cluster: &Self::Cluster) -> Self::Port

Available on crate feature build only.
Source§

fn allocate_external_port(external: &Self::External) -> Self::Port

Available on crate feature build only.
Source§

fn o2o_sink_source( p1: &Self::Process, p1_port: &Self::Port, p2: &Self::Process, p2_port: &Self::Port, ) -> (Expr, Expr)

Available on crate feature build only.
Source§

fn o2o_connect( p1: &Self::Process, p1_port: &Self::Port, p2: &Self::Process, p2_port: &Self::Port, ) -> Box<dyn FnOnce()>

Available on crate feature build only.
Source§

fn o2m_sink_source( p1: &Self::Process, p1_port: &Self::Port, c2: &Self::Cluster, c2_port: &Self::Port, ) -> (Expr, Expr)

Available on crate feature build only.
Source§

fn o2m_connect( p1: &Self::Process, p1_port: &Self::Port, c2: &Self::Cluster, c2_port: &Self::Port, ) -> Box<dyn FnOnce()>

Available on crate feature build only.
Source§

fn m2o_sink_source( c1: &Self::Cluster, c1_port: &Self::Port, p2: &Self::Process, p2_port: &Self::Port, ) -> (Expr, Expr)

Available on crate feature build only.
Source§

fn m2o_connect( c1: &Self::Cluster, c1_port: &Self::Port, p2: &Self::Process, p2_port: &Self::Port, ) -> Box<dyn FnOnce()>

Available on crate feature build only.
Source§

fn m2m_sink_source( c1: &Self::Cluster, c1_port: &Self::Port, c2: &Self::Cluster, c2_port: &Self::Port, ) -> (Expr, Expr)

Available on crate feature build only.
Source§

fn m2m_connect( c1: &Self::Cluster, c1_port: &Self::Port, c2: &Self::Cluster, c2_port: &Self::Port, ) -> Box<dyn FnOnce()>

Available on crate feature build only.
Source§

fn e2o_many_source( extra_stmts: &mut Vec<Stmt>, p2: &Self::Process, p2_port: &Self::Port, _codec_type: &Type, shared_handle: String, ) -> Expr

Available on crate feature build only.
Source§

fn e2o_many_sink(shared_handle: String) -> Expr

Available on crate feature build only.
Source§

fn e2o_source( extra_stmts: &mut Vec<Stmt>, p1: &Self::External, p1_port: &Self::Port, p2: &Self::Process, p2_port: &Self::Port, _codec_type: &Type, shared_handle: String, ) -> Expr

Available on crate feature build only.
Source§

fn e2o_connect( p1: &Self::External, p1_port: &Self::Port, p2: &Self::Process, p2_port: &Self::Port, many: bool, server_hint: NetworkHint, ) -> Box<dyn FnOnce()>

Available on crate feature build only.
Source§

fn o2e_sink( p1: &Self::Process, p1_port: &Self::Port, p2: &Self::External, p2_port: &Self::Port, shared_handle: String, ) -> Expr

Available on crate feature build only.
Source§

fn cluster_ids( of_cluster: usize, ) -> impl QuotedWithContext<'a, &'a [TaglessMemberId], ()> + Clone + 'a

Available on crate feature build only.
Source§

fn cluster_self_id() -> impl QuotedWithContext<'a, TaglessMemberId, ()> + Clone + 'a

Available on crate feature build only.
Source§

fn cluster_membership_stream( location_id: &LocationId, ) -> impl QuotedWithContext<'a, Box<dyn Stream<Item = (TaglessMemberId, MembershipEvent)> + Unpin>, ()>

Available on crate feature build only.
Source§

fn has_trivial_node() -> bool

Available on crate feature build only.
Source§

fn trivial_process(_id: usize) -> Self::Process

Available on crate feature build only.
Source§

fn trivial_cluster(_id: usize) -> Self::Cluster

Available on crate feature build only.
Source§

fn trivial_external(_id: usize) -> Self::External

Available on crate feature build only.
Source§

impl<'a> ExternalSpec<'a, DockerDeploy> for DockerDeployExternalSpec

Source§

fn build( self, id: usize, name_hint: &str, ) -> <DockerDeploy as Deploy<'a>>::External

Available on crate feature build only.
Source§

impl<'a> ProcessSpec<'a, DockerDeploy> for DockerDeployProcessSpec

Source§

fn build( self, id: usize, name_hint: &str, ) -> <DockerDeploy as Deploy<'a>>::Process

Available on crate feature build only.
Source§

impl<'a> RegisterPort<'a, DockerDeploy> for DockerDeployExternal

Source§

fn register(&self, key: usize, port: <DockerDeploy as Deploy<'_>>::Port)

Available on crate feature build only.
Source§

fn raw_port(&self, key: usize) -> <DockerDeploy as Deploy<'a>>::ExternalRawPort

Available on crate feature build only.
Source§

fn as_bytes_bidi( &self, key: usize, ) -> impl Future<Output = (Pin<Box<dyn Stream<Item = Result<BytesMut, Error>>>>, Pin<Box<dyn Sink<Bytes, Error = Error>>>)> + 'a

Available on crate feature build only.
Source§

fn as_bincode_bidi<InT, OutT>( &self, key: usize, ) -> impl Future<Output = (Pin<Box<dyn Stream<Item = OutT>>>, Pin<Box<dyn Sink<InT, Error = Error>>>)> + 'a
where InT: Serialize + 'static, OutT: DeserializeOwned + 'static,

Available on crate feature build only.
Source§

fn as_bincode_sink<T>( &self, key: usize, ) -> impl Future<Output = Pin<Box<dyn Sink<T, Error = Error>>>> + 'a
where T: Serialize + 'static,

Available on crate feature build only.
Source§

fn as_bincode_source<T>( &self, key: usize, ) -> impl Future<Output = Pin<Box<dyn Stream<Item = T>>>> + 'a
where T: DeserializeOwned + 'static,

Available on crate feature build only.

Auto Trait Implementations§

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
§

impl<T, U> Into<U> for T
where U: From<T>,

§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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 more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
§

impl<T> ToSinkBuild for T

§

fn iter_to_sink_build(self) -> SendIterBuild<Self>
where Self: Sized + Iterator,

Starts a [SinkBuild] adaptor chain to send all items from self as an Iterator.
§

fn stream_to_sink_build(self) -> SendStreamBuild<Self>
where Self: Sized + Stream,

Starts a [SinkBuild] adaptor chain to send all items from self as a [Stream].
§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more