pub trait DockerServiceConfig: Send + 'static {
// Required methods
fn id(&self) -> String;
fn is_user_managed(&self) -> bool;
fn image(&self) -> String;
// Provided methods
fn args(&self) -> Vec<String> { ... }
fn envs(&self) -> Vec<(String, String)> { ... }
fn ports(&self) -> Vec<(String, String)> { ... }
fn data_path(&self) -> Option<String> { ... }
}
Expand description
Configuration for a docker-backed service.
The trait can be implemented for the configuration struct of a service.
After that, use DockerService<Config>
as the service type.
Required Methods§
Sourcefn is_user_managed(&self) -> bool
fn is_user_managed(&self) -> bool
Whether the service is managed by the user.
If true, no docker container will be started and the service will be forwarded to
the DummyService
.
Provided Methods§
Sourcefn envs(&self) -> Vec<(String, String)>
fn envs(&self) -> Vec<(String, String)>
The environment variables to pass to the docker container.