Skip to content

Commit

Permalink
docs: update agents/rust/mediator/README.md (#1032)
Browse files Browse the repository at this point in the history
Signed-off-by: Naian <[email protected]>
  • Loading branch information
nain-F49FF806 authored Oct 27, 2023
1 parent 939ec0e commit 2229bab
Showing 1 changed file with 21 additions and 5 deletions.
26 changes: 21 additions & 5 deletions agents/rust/mediator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,8 @@ A mediator service for Aries Agents.
## Build

This project depends on `aries-vcx` and is tightly integrated to work with it.
As such we expect this `mediator` module to be in a subdirectory of aries-vcx repo.
You may transplant it, but expect to change the `Cargo.toml` and adjust the dependencies on aries modules manually.

When ready it's simple to build.
When ready, it's simple to build.

```bash
# Dev environment build
Expand All @@ -26,13 +24,21 @@ cargo run --bin mediator
```

```bash
# For testing / demo purposes
# For manual testing / demo purposes
cargo run --package client-tui

# To also see panic and debug info produced by tui
cargo run --package client-tui 2> err || cat err
```

```bash
# To run automated tests, you should have a mediator already running
# # Terminal 1
cargo run --bin mediator
# # Terminal 2
cargo test
```

### Configurable Options

Currently the mediator reads the following environment variables.
Expand All @@ -45,10 +51,20 @@ Currently the mediator reads the following environment variables.

`MYSQL_URL`:
- **Description**: MySQL url for the MYSQL database used for mediator persistence.
- **Default**: -
- **Default**: - (This is required!)
- **Usage**: `MYSQL_URL=mysql://admin:password1235@localhost:3306/mediator-persistence.db`
```

### Configurable Features

Mediator's Agent contains some client code, which is used for testing, and dependent crates.
In production, you may want to remove this. To do so, pass `--no-default-features` to cargo when building.
This will ensure you are not pulling in the client code.

```bash
cargo build --package mediator --no-default-features --release
```

## API

Currently exposed endpoints.
Expand Down

0 comments on commit 2229bab

Please sign in to comment.