pub struct DockerDeploy { /* private fields */ }Available on crate feature
docker_deploy and (crate features deploy or sim) only.Expand description
For deploying to a local docker instance
Implementations§
Source§impl DockerDeploy
impl DockerDeploy
Sourcepub fn new(network: DockerNetwork) -> Self
pub fn new(network: DockerNetwork) -> Self
Create a new deployment
Sourcepub fn add_localhost_docker(
&mut self,
rustflags: Option<String>,
config: Vec<String>,
) -> DockerDeployProcessSpec
pub fn add_localhost_docker( &mut self, rustflags: Option<String>, config: Vec<String>, ) -> DockerDeployProcessSpec
Add an internal docker service to the deployment.
Sourcepub fn add_localhost_docker_cluster(
&mut self,
rustflags: Option<String>,
config: Vec<String>,
count: usize,
) -> DockerDeployClusterSpec
pub fn add_localhost_docker_cluster( &mut self, rustflags: Option<String>, config: Vec<String>, count: usize, ) -> DockerDeployClusterSpec
Add an internal docker cluster to the deployment.
Sourcepub fn add_external(&self, name: String) -> DockerDeployExternalSpec
pub fn add_external(&self, name: String) -> DockerDeployExternalSpec
Add an external process to the deployment.
Sourcepub fn get_deployment_instance(&self) -> String
pub fn get_deployment_instance(&self) -> String
Get the deployment instance from this deployment.
Sourcepub async fn provision(
&self,
nodes: &DeployResult<'_, Self>,
) -> Result<(), Error>
pub async fn provision( &self, nodes: &DeployResult<'_, Self>, ) -> Result<(), Error>
Create docker images.
Sourcepub async fn start(&self, nodes: &DeployResult<'_, Self>) -> Result<(), Error>
pub async fn start(&self, nodes: &DeployResult<'_, Self>) -> Result<(), Error>
Start the deployment, tell docker to create containers from the existing provisioned images.
Trait Implementations§
Source§impl<'a> ClusterSpec<'a, DockerDeploy> for DockerDeployClusterSpec
impl<'a> ClusterSpec<'a, DockerDeploy> for DockerDeployClusterSpec
Source§fn build(
self,
key: LocationKey,
name_hint: &str,
) -> <DockerDeploy as Deploy<'a>>::Cluster
fn build( self, key: LocationKey, name_hint: &str, ) -> <DockerDeploy as Deploy<'a>>::Cluster
Available on crate feature
build only.Source§impl<'a> Deploy<'a> for DockerDeploy
impl<'a> Deploy<'a> for DockerDeploy
Source§type InstantiateEnv = DockerDeploy
type InstantiateEnv = DockerDeploy
Available on crate feature
build only.Source§type Process = DockerDeployProcess
type Process = DockerDeployProcess
Available on crate feature
build only.Source§type Cluster = DockerDeployCluster
type Cluster = DockerDeployCluster
Available on crate feature
build only.Source§type External = DockerDeployExternal
type External = DockerDeployExternal
Available on crate feature
build only.Source§fn o2o_sink_source(
_env: &mut Self::InstantiateEnv,
p1: &Self::Process,
p1_port: &<Self::Process as Node>::Port,
p2: &Self::Process,
p2_port: &<Self::Process as Node>::Port,
name: Option<&str>,
networking_info: &NetworkingInfo,
_external_types: Option<(&Type, &Type)>,
) -> (Expr, Expr)
fn o2o_sink_source( _env: &mut Self::InstantiateEnv, p1: &Self::Process, p1_port: &<Self::Process as Node>::Port, p2: &Self::Process, p2_port: &<Self::Process as Node>::Port, name: Option<&str>, networking_info: &NetworkingInfo, _external_types: Option<(&Type, &Type)>, ) -> (Expr, Expr)
Available on crate feature
build only.Generates the source and sink expressions when connecting a
Self::Process to another
Self::Process. Read moreSource§fn o2o_connect(
p1: &Self::Process,
p1_port: &<Self::Process as Node>::Port,
p2: &Self::Process,
p2_port: &<Self::Process as Node>::Port,
) -> Box<dyn FnOnce()>
fn o2o_connect( p1: &Self::Process, p1_port: &<Self::Process as Node>::Port, p2: &Self::Process, p2_port: &<Self::Process as Node>::Port, ) -> Box<dyn FnOnce()>
Available on crate feature
build only.Performs any runtime wiring needed after code generation for a
Self::Process-to-Self::Process channel. Read moreSource§fn o2m_sink_source(
_env: &mut Self::InstantiateEnv,
p1: &Self::Process,
p1_port: &<Self::Process as Node>::Port,
c2: &Self::Cluster,
c2_port: &<Self::Cluster as Node>::Port,
name: Option<&str>,
networking_info: &NetworkingInfo,
_external_types: Option<(&Type, &Type)>,
) -> (Expr, Expr)
fn o2m_sink_source( _env: &mut Self::InstantiateEnv, p1: &Self::Process, p1_port: &<Self::Process as Node>::Port, c2: &Self::Cluster, c2_port: &<Self::Cluster as Node>::Port, name: Option<&str>, networking_info: &NetworkingInfo, _external_types: Option<(&Type, &Type)>, ) -> (Expr, Expr)
Available on crate feature
build only.Generates the source and sink expressions when connecting a
Self::Process to a
Self::Cluster (one-to-many). Read moreSource§fn o2m_connect(
p1: &Self::Process,
p1_port: &<Self::Process as Node>::Port,
c2: &Self::Cluster,
c2_port: &<Self::Cluster as Node>::Port,
) -> Box<dyn FnOnce()>
fn o2m_connect( p1: &Self::Process, p1_port: &<Self::Process as Node>::Port, c2: &Self::Cluster, c2_port: &<Self::Cluster as Node>::Port, ) -> Box<dyn FnOnce()>
Available on crate feature
build only.Performs any runtime wiring needed after code generation for a
Self::Process-to-Self::Cluster channel. Read moreSource§fn m2o_sink_source(
_env: &mut Self::InstantiateEnv,
c1: &Self::Cluster,
c1_port: &<Self::Cluster as Node>::Port,
p2: &Self::Process,
p2_port: &<Self::Process as Node>::Port,
name: Option<&str>,
networking_info: &NetworkingInfo,
_external_types: Option<(&Type, &Type)>,
) -> (Expr, Expr)
fn m2o_sink_source( _env: &mut Self::InstantiateEnv, c1: &Self::Cluster, c1_port: &<Self::Cluster as Node>::Port, p2: &Self::Process, p2_port: &<Self::Process as Node>::Port, name: Option<&str>, networking_info: &NetworkingInfo, _external_types: Option<(&Type, &Type)>, ) -> (Expr, Expr)
Available on crate feature
build only.Generates the source and sink expressions when connecting a
Self::Cluster to a
Self::Process (many-to-one). Read moreSource§fn m2o_connect(
c1: &Self::Cluster,
c1_port: &<Self::Cluster as Node>::Port,
p2: &Self::Process,
p2_port: &<Self::Process as Node>::Port,
) -> Box<dyn FnOnce()>
fn m2o_connect( c1: &Self::Cluster, c1_port: &<Self::Cluster as Node>::Port, p2: &Self::Process, p2_port: &<Self::Process as Node>::Port, ) -> Box<dyn FnOnce()>
Available on crate feature
build only.Performs any runtime wiring needed after code generation for a
Self::Cluster-to-Self::Process channel. Read moreSource§fn m2m_sink_source(
_env: &mut Self::InstantiateEnv,
c1: &Self::Cluster,
c1_port: &<Self::Cluster as Node>::Port,
c2: &Self::Cluster,
c2_port: &<Self::Cluster as Node>::Port,
name: Option<&str>,
networking_info: &NetworkingInfo,
_external_types: Option<(&Type, &Type)>,
) -> (Expr, Expr)
fn m2m_sink_source( _env: &mut Self::InstantiateEnv, c1: &Self::Cluster, c1_port: &<Self::Cluster as Node>::Port, c2: &Self::Cluster, c2_port: &<Self::Cluster as Node>::Port, name: Option<&str>, networking_info: &NetworkingInfo, _external_types: Option<(&Type, &Type)>, ) -> (Expr, Expr)
Available on crate feature
build only.Generates the source and sink expressions when connecting a
Self::Cluster to another
Self::Cluster (many-to-many). Read moreSource§fn m2m_connect(
c1: &Self::Cluster,
c1_port: &<Self::Cluster as Node>::Port,
c2: &Self::Cluster,
c2_port: &<Self::Cluster as Node>::Port,
) -> Box<dyn FnOnce()>
fn m2m_connect( c1: &Self::Cluster, c1_port: &<Self::Cluster as Node>::Port, c2: &Self::Cluster, c2_port: &<Self::Cluster as Node>::Port, ) -> Box<dyn FnOnce()>
Available on crate feature
build only.Performs any runtime wiring needed after code generation for a
Self::Cluster-to-Self::Cluster channel. Read moreSource§fn e2o_many_source(
extra_stmts: &mut Vec<Stmt>,
p2: &Self::Process,
p2_port: &<Self::Process as Node>::Port,
codec_type: &Type,
encode_type: &Type,
shared_handle: String,
) -> Expr
fn e2o_many_source( extra_stmts: &mut Vec<Stmt>, p2: &Self::Process, p2_port: &<Self::Process as Node>::Port, codec_type: &Type, encode_type: &Type, shared_handle: String, ) -> Expr
Available on crate feature
build only.Source§fn e2o_many_sink(shared_handle: String) -> Expr
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::External as Node>::Port,
p2: &Self::Process,
p2_port: &<Self::Process as Node>::Port,
_codec_type: &Type,
_encode_type: &Type,
shared_handle: String,
) -> Expr
fn e2o_source( extra_stmts: &mut Vec<Stmt>, p1: &Self::External, p1_port: &<Self::External as Node>::Port, p2: &Self::Process, p2_port: &<Self::Process as Node>::Port, _codec_type: &Type, _encode_type: &Type, shared_handle: String, ) -> Expr
Available on crate feature
build only.Source§fn e2o_connect(
p1: &Self::External,
p1_port: &<Self::External as Node>::Port,
p2: &Self::Process,
p2_port: &<Self::Process as Node>::Port,
many: bool,
server_hint: NetworkHint,
) -> Box<dyn FnOnce()>
fn e2o_connect( p1: &Self::External, p1_port: &<Self::External as Node>::Port, p2: &Self::Process, p2_port: &<Self::Process as Node>::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::Process as Node>::Port,
p2: &Self::External,
p2_port: &<Self::External as Node>::Port,
shared_handle: String,
) -> Expr
fn o2e_sink( p1: &Self::Process, p1_port: &<Self::Process as Node>::Port, p2: &Self::External, p2_port: &<Self::External as Node>::Port, shared_handle: String, ) -> Expr
Available on crate feature
build only.Source§fn cluster_ids(of_cluster: LocationKey) -> Expr
fn cluster_ids(of_cluster: LocationKey) -> Expr
Available on crate feature
build only.The IDs of
of_cluster’s members, as an expression of type &[Id].
Id is this backend’s member ID type (see SupportsMemberId).Source§fn cluster_self_id() -> Expr
fn cluster_self_id() -> Expr
Available on crate feature
build only.This member’s own ID, as an expression of type
Id.Source§fn cluster_membership_stream(
_env: &mut Self::InstantiateEnv,
_at_location: &LocationId,
location_id: &LocationId,
) -> Expr
fn cluster_membership_stream( _env: &mut Self::InstantiateEnv, _at_location: &LocationId, location_id: &LocationId, ) -> Expr
Available on crate feature
build only.The membership events of
location_id, as seen from at_location.
The expression has type Box<dyn Stream<Item = (Id, MembershipEvent)> + Unpin>.Source§const SUPPORTS_EXTERNAL_SERIALIZATION: bool = false
const SUPPORTS_EXTERNAL_SERIALIZATION: bool = false
Available on crate feature
build only.Whether this deployment backend supports network channels that leave serialization to code
outside of Hydro (see
crate::networking::Embedded). When false, attempting to use such
a channel will panic during instantiation.Source§fn network_sink(sink: Expr) -> NetworkSink
fn network_sink(sink: Expr) -> NetworkSink
Available on crate feature
build only.Classifies the sending end returned by the
*_sink_source methods: how the generated DFIR
drives it. See NetworkSink. Read moreSource§fn e2m_source(
extra_stmts: &mut Vec<Stmt>,
p1: &Self::External,
p1_port: &<Self::External as Node>::Port,
c2: &Self::Cluster,
c2_port: &<Self::Cluster as Node>::Port,
codec_type: &Type,
encode_type: &Type,
shared_handle: String,
) -> Expr
fn e2m_source( extra_stmts: &mut Vec<Stmt>, p1: &Self::External, p1_port: &<Self::External as Node>::Port, c2: &Self::Cluster, c2_port: &<Self::Cluster as Node>::Port, codec_type: &Type, encode_type: &Type, shared_handle: String, ) -> Expr
Available on crate feature
build only.Source§fn e2m_connect(
p1: &Self::External,
p1_port: &<Self::External as Node>::Port,
c2: &Self::Cluster,
c2_port: &<Self::Cluster as Node>::Port,
server_hint: NetworkHint,
) -> Box<dyn FnOnce()>
fn e2m_connect( p1: &Self::External, p1_port: &<Self::External as Node>::Port, c2: &Self::Cluster, c2_port: &<Self::Cluster as Node>::Port, server_hint: NetworkHint, ) -> Box<dyn FnOnce()>
Available on crate feature
build only.Source§fn m2e_sink(
c1: &Self::Cluster,
c1_port: &<Self::Cluster as Node>::Port,
p2: &Self::External,
p2_port: &<Self::External as Node>::Port,
shared_handle: String,
) -> Expr
fn m2e_sink( c1: &Self::Cluster, c1_port: &<Self::Cluster as Node>::Port, p2: &Self::External, p2_port: &<Self::External as Node>::Port, shared_handle: String, ) -> Expr
Available on crate feature
build only.Source§fn register_embedded_stream_input(
_env: &mut Self::InstantiateEnv,
_location_key: LocationKey,
_ident: &Ident,
_element_type: &Type,
)
fn register_embedded_stream_input( _env: &mut Self::InstantiateEnv, _location_key: LocationKey, _ident: &Ident, _element_type: &Type, )
Available on crate feature
build only.Registers an embedded stream input for the given ident and element type. Read more
Source§fn register_embedded_singleton_input(
_env: &mut Self::InstantiateEnv,
_location_key: LocationKey,
_ident: &Ident,
_element_type: &Type,
)
fn register_embedded_singleton_input( _env: &mut Self::InstantiateEnv, _location_key: LocationKey, _ident: &Ident, _element_type: &Type, )
Available on crate feature
build only.Registers an embedded singleton input for the given ident and element type. Read more
Source§fn register_embedded_output(
_env: &mut Self::InstantiateEnv,
_location_key: LocationKey,
_ident: &Ident,
_element_type: &Type,
)
fn register_embedded_output( _env: &mut Self::InstantiateEnv, _location_key: LocationKey, _ident: &Ident, _element_type: &Type, )
Available on crate feature
build only.Registers an embedded output for the given ident and element type. Read more
Source§impl<'a> ExternalSpec<'a, DockerDeploy> for DockerDeployExternalSpec
impl<'a> ExternalSpec<'a, DockerDeploy> for DockerDeployExternalSpec
Source§fn build(
self,
key: LocationKey,
name_hint: &str,
) -> <DockerDeploy as Deploy<'a>>::External
fn build( self, key: LocationKey, name_hint: &str, ) -> <DockerDeploy as Deploy<'a>>::External
Available on crate feature
build only.Source§impl<'a> ProcessSpec<'a, DockerDeploy> for DockerDeployProcessSpec
impl<'a> ProcessSpec<'a, DockerDeploy> for DockerDeployProcessSpec
Source§fn build(
self,
key: LocationKey,
name_hint: &str,
) -> <DockerDeploy as Deploy<'a>>::Process
fn build( self, key: LocationKey, name_hint: &str, ) -> <DockerDeploy as Deploy<'a>>::Process
Available on crate feature
build only.Source§impl<'a> RegisterPort<'a, DockerDeploy> for DockerDeployExternal
impl<'a> RegisterPort<'a, DockerDeploy> for DockerDeployExternal
Source§fn register(&self, external_port_id: ExternalPortId, port: Self::Port)
fn register(&self, external_port_id: ExternalPortId, port: Self::Port)
Available on crate feature
build only.Source§fn as_bytes_bidi(
&self,
external_port_id: ExternalPortId,
) -> impl Future<Output = (Pin<Box<dyn Stream<Item = Result<BytesMut, Error>>>>, Pin<Box<dyn Sink<Bytes, Error = Error>>>)> + 'a
fn as_bytes_bidi( &self, external_port_id: ExternalPortId, ) -> 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,
external_port_id: ExternalPortId,
) -> impl Future<Output = (Pin<Box<dyn Stream<Item = OutT>>>, Pin<Box<dyn Sink<InT, Error = Error>>>)> + 'awhere
InT: Serialize + 'static,
OutT: DeserializeOwned + 'static,
fn as_bincode_bidi<InT, OutT>(
&self,
external_port_id: ExternalPortId,
) -> impl Future<Output = (Pin<Box<dyn Stream<Item = OutT>>>, Pin<Box<dyn Sink<InT, Error = Error>>>)> + 'awhere
InT: Serialize + 'static,
OutT: DeserializeOwned + 'static,
Available on crate feature
build only.Source§fn as_bincode_sink<T>(
&self,
external_port_id: ExternalPortId,
) -> impl Future<Output = Pin<Box<dyn Sink<T, Error = Error>>>> + 'awhere
T: Serialize + 'static,
fn as_bincode_sink<T>(
&self,
external_port_id: ExternalPortId,
) -> impl Future<Output = Pin<Box<dyn Sink<T, Error = Error>>>> + 'awhere
T: Serialize + 'static,
Available on crate feature
build only.Source§fn as_bincode_source<T>(
&self,
external_port_id: ExternalPortId,
) -> impl Future<Output = Pin<Box<dyn Stream<Item = T>>>> + 'awhere
T: DeserializeOwned + 'static,
fn as_bincode_source<T>(
&self,
external_port_id: ExternalPortId,
) -> impl Future<Output = Pin<Box<dyn Stream<Item = T>>>> + 'awhere
T: DeserializeOwned + 'static,
Available on crate feature
build only.impl SupportsMemberId<String> for DockerDeploy
Docker names each cluster’s members with Strings.
Auto Trait Implementations§
impl Forget for DockerDeploy
impl Freeze for DockerDeploywhere
*const u8 is !null: Freeze,
PhantomData<DockerDeployProcessSpec>: Freeze,
PhantomData<DockerDeployClusterSpec>: Freeze,
PhantomData<u8>: Freeze,
impl Move for DockerDeploy
impl RefUnwindSafe for DockerDeploy
impl Send for DockerDeploywhere
RawVecInner: Send,
impl Sync for DockerDeploywhere
RawVecInner: Sync,
impl Unpin for DockerDeploy
impl UnsafeUnpin for DockerDeploywhere
*const u8 is !null: UnsafeUnpin,
PhantomData<DockerDeployProcessSpec>: UnsafeUnpin,
PhantomData<DockerDeployClusterSpec>: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
impl UnwindSafe for DockerDeploywhere
RawVecInner: UnwindSafe,
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§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.