#[non_exhaustive]pub struct RunOptions {
pub provider: Option<Provider>,
pub secrets: Secrets,
pub host_label: Option<String>,
pub lifetime: Option<Duration>,
pub env: BTreeMap<String, String>,
pub reveal: bool,
pub docker_context: Option<String>,
pub operation: Option<OperationId>,
}Expand description
The options of one operation.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.provider: Option<Provider>The Vagrant provider (vagrant up --provider), for a Vagrant project.
secrets: SecretsSensitive values every tool of the operation gets, as its format reads them
(each by its name; Terraform also gets it as TF_VAR_<name>): never stored, never written to a file, masked in every event.
Pass them to every operation.
host_label: Option<String>What the embedder calls the place the run is on (a server or account id): recorded, so a
later operation asked for elsewhere is refused (running_elsewhere).
lifetime: Option<Duration>How long the run may live from its up: recorded as its expiry (crate::RunRecord’s
expires_at), which the reaper reads (crate::Runner::expired).
env: BTreeMap<String, String>Values every tool of the operation gets, by name, as its format reads them
(Compose’s ${NAME}, a Vagrantfile’s ENV, Terraform’s
TF_VAR_NAME too). Never stored: pass them to every operation.
reveal: boolA status read only: each sensitive output’s own value instead of ***, for its caller
to use (an admin password a project gives back). Never in an event, never stored; a service
gives it only over its owner-only endpoint. Off by default.
docker_context: Option<String>The Docker context the run’s docker calls go to (docker --context <it>), whatever the
current one is: given at up (or any later operation), recorded with the run, and used by
every later operation and read that gives none. None: the current context, as docker
picks it.
operation: Option<OperationId>The journaled operation this one is: a row a service queued (Tx::queue_operation), which
the operation begins instead of journaling a new one.
Implementations§
Source§impl RunOptions
impl RunOptions
Sourcepub fn new() -> RunOptions
pub fn new() -> RunOptions
No value, no secret, nothing recorded about the place.
Sourcepub fn with_env(
self,
name: impl Into<String>,
value: impl Into<String>,
) -> RunOptions
pub fn with_env( self, name: impl Into<String>, value: impl Into<String>, ) -> RunOptions
Sets variable name to value for every tool of the operation.
Sourcepub fn with_secrets(self, secrets: Secrets) -> RunOptions
pub fn with_secrets(self, secrets: Secrets) -> RunOptions
Gives the tools the sensitive values secrets.
Sourcepub fn with_operation(self, id: OperationId) -> RunOptions
pub fn with_operation(self, id: OperationId) -> RunOptions
Runs as the queued operation id of the home’s journal (crate::store::Tx::queue_operation).
Sourcepub fn with_host_label(self, label: impl Into<String>) -> RunOptions
pub fn with_host_label(self, label: impl Into<String>) -> RunOptions
Records the place the run is on as label.
Sourcepub fn with_provider(self, provider: Provider) -> RunOptions
pub fn with_provider(self, provider: Provider) -> RunOptions
Runs with Vagrant provider provider.
Sourcepub fn with_docker_context(self, context: impl Into<String>) -> RunOptions
pub fn with_docker_context(self, context: impl Into<String>) -> RunOptions
Sends the run’s docker calls to Docker context context (RunOptions::docker_context).
Sourcepub fn with_lifetime(self, lifetime: Duration) -> RunOptions
pub fn with_lifetime(self, lifetime: Duration) -> RunOptions
Lets the run live lifetime from its up.
Sourcepub fn with_reveal(self) -> RunOptions
pub fn with_reveal(self) -> RunOptions
A status read that gives the sensitive outputs’ own values (RunOptions::reveal).