Skip to main content

Crate cloud_terrastodon_command

Crate cloud_terrastodon_command 

Source
Expand description

This crate provides utilities for building, running, and managing external commands within the Cloud Terrastodon project. It includes features for:

  • Specifying different command kinds (Azure CLI, Terraform, VSCode, Echo, Pwsh).
  • Building command arguments and environment variables.
  • Handling file arguments for commands like Azure CLI.
  • Configuring output behavior (capture or display).
  • Implementing retry logic for authentication failures.
  • Caching command output for improved performance.
  • Sending content to command stdin.
  • Writing command failures and successes to files for debugging and caching.

Re-exports§

pub use bstr;

Modules§

app_work

Macros§

impl_cacheable_into_future
Implement IntoFuture and CacheInvalidatableIntoFuture for a concrete CacheableCommand type without repeating boilerplate.

Structs§

CacheKey
CommandBuilder
CommandOutput
ParallelFallibleWorkQueue
PrefixPathMapper

Enums§

CommandArgument
CommandKind
OutputBehaviour
RetryBehaviour

Constants§

USE_TOFU_FLAG_KEY

Traits§

CacheInvalidatable
CacheInvalidatableIntoFuture
CacheableCommand
Convenience trait for implementing commands that can be cached. This command gives HasCacheKey and [InvalidatableCommand] implementations.
FromCommandOutput
HasCacheKey
NoSpaces
PathMapper

Functions§

discover_caches
Walk the provided commands directory and discover cache entries by locating timestamp.txt files. For each found timestamp.txt we parse the last line as the most-recently-used timestamp and return a vector of (CacheKey, DateTime) sorted by most-recently-used first.

Attribute Macros§

async_trait