Crates.io | cargo-prosa |
lib.rs | cargo-prosa |
version | 0.1.1 |
source | src |
created_at | 2024-03-20 16:04:36.185898 |
updated_at | 2024-07-10 09:55:11.757248 |
description | ProSA utility to package and deliver a builded ProSA |
homepage | https://worldline.com/ |
repository | https://github.com/worldline/ProSA |
max_upload_size | |
id | 1180675 |
size | 138,089 |
ProSA is a framework that handles processors organized around a service bus. As such, ProSA needs to be built from internal or external Processors/Adaptor/Main.
cargo-prosa is a utility to package and deliver a builded ProSA. This builder is packaged within cargo as a custom command to be well integrated with the Rust ecosystem.
To use it, you need to install it within Cargo.
cargo install cargo-prosa
Create your own ProSA (work like cargo):
cargo prosa new my-prosa
# or from an existing folder, init it
cargo prosa init
cargo-prosa is meant to evolve in the future.
So maybe new things will be introduced.
To update your model, you can update the generated file with cargo prosa update
.
If you have different main/tvf, select them:
cargo prosa main MainProc
cargo prosa tvf SimpleStringTvf
Add your dependencies and your processor with its adaptor name
cargo add prosa
cargo prosa add -n stub-1 -a StubParotAdaptor stub
Once your ProSA is specified, the file ProSA.toml will contain the configuration. This file can be edited manually if you want.
Your project uses a build.rs/main.rs to create a binary that you can use.
Keep in mind that you also need to have a settings file.
You can initiate a default one with:
cargo run -- -c default_config.yaml --dry_run
A configuration file contains:
When your ProSA is built, you can deploy like any Rust binary. So you'll find it in the target folder.
And you can run it:
cargo run -- -n "MyBuiltProSA" -c default_config.yaml
# or with binary
target/debug/my-prosa -n "MyBuiltProSA" -c default_config.yaml