Crates.io | peace_item_sh_sync_cmd |
lib.rs | peace_item_sh_sync_cmd |
version | 0.0.10 |
source | src |
created_at | 2023-06-03 08:34:01.202121 |
updated_at | 2023-06-03 08:34:01.202121 |
description | Manages a synchronization shell command for the peace framework |
homepage | |
repository | https://github.com/azriel91/peace |
max_upload_size | |
id | 881461 |
size | 24,781 |
peace
is a framework to build empathetic and forgiving software automation.
See:
peace.mk for the project vision.
Background for the motivation to create this framework.
Operations UX for a book about the dimensions considered during peace
's design and development.
A joy to use.
Ergonomic API and guidance to do the right thing.
Understandable output.
Symbol | Meaning |
---|---|
🟢 | Works well |
🟡 | Partial support |
⚫ | Planned |
🔵 | Compatible by design |
🟣 | Works, "fun idea" |
🟢 Idempotent: Multiple invocations result in the desired outcome.
🟢 Clean: Every item creation is paired with how it is cleaned up.
🟢 Understandable: Progress is shown at an understandable level of detail.
🔵 Understandable: Error reporting is compatible with miette
.
🟡 Interruptible: Execution can be interrupted.
🟢 Resumable: Automation resumes where it was interrupted.
🟢 Diffable: States and diffs are serialized as YAML.
🟢 Efficient: Tasks are concurrently executed via fn_graph
.
🟢 Namespaced: Profile directories isolate environments from each other.
🟢 Type Safe: Items and parameters are defined in code, not configuration.
tokio-graceful-shutdown
.peace
binary for configuration based workflows.peace
on servers (Web API invocation).Further ideas:
Back up current state.
Restore previous state.
Telemetry / metrics logging for analysis.
Examples are run using --package
instead of --example
, as each example is organized as its own crate.
cargo run --package $example_name --all-features
# e.g.
cargo build --package download --all-features
cargo run -q --package download --all-features -- init https://ifconfig.me ip.json
for cmd in status desired diff ensure ensure diff clean clean diff
do
printf "=== ${cmd} ===\n"
cargo run -q --package download --all-features -- --format text $cmd
printf '\n'
done
# Look at metadata that Peace has saved
find .peace -type f -exec bash -c 'echo \# {}; cat {}; echo' \;
# Clean up the metadata directory
rm -rf .peace
The download
example can be built as a web assembly application using wasm-pack
:
cd examples/download
wasm-pack build --target web
In the examples/download
directory, start an HTTP server, and open http://localhost:8000/:
python3 -m http.server 8000 # or
simple-http-server --nocache --port 8000 -i
Licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.