Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 5 additions & 51 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 1 addition & 16 deletions crates/hotfix-status/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Other

- Fix initial creation time setting in redb store
- Add check for code formatting
- Add code coverage badge
- Update version to 0.0.21 to release DynamoDB stores
- Prepare for 0.0.19 release
- Update README with Test Requests
- Update README with next steps
- Process backlog of messages when a resend is completed
- Update README
- Nicer API for manipulating groups and example application using repeating groups
- Add badges
- Update crates in preparation for 0.0.11 release
- Switch to internal fork of ferrumfix for message encoding and decoding
- Use fix44 types for message generation
- Prepare project for crates.io publishing
- Initial commit
- initial release
4 changes: 2 additions & 2 deletions crates/hotfix-status/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[package]
name = "hotfix-status"
description = "Status endpoints and an option web-based dashboard for the HotFIX engine"
version.workspace = true
version = "0.1.0"
authors.workspace = true
edition.workspace = true
license.workspace = true
readme.workspace = true
readme = "README.md"
homepage.workspace = true
repository.workspace = true
keywords.workspace = true
Expand Down
39 changes: 39 additions & 0 deletions crates/hotfix-status/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<div align="center">

# hotfix-status

**Status APIs and UI for the HotFIX engine.**

</div>

This crate is an add-on for the [HotFIX engine](https://github.com/Validus-Risk-Management/hotfix)
to provide useful APIs about the FIX session state and health.

Optionally, it also provides a web-based UI to view and manage the session state.

## Usage

`hotfix-status` build an `axum` router you can embed in your application in any way you like.

To build the router, just call `build_router` with the HotFIX session ref:

```rust
...

use hotfix_status::build_router;

...

async fn start_status_service(session_ref: SessionRef<Message>) {
let status_router = build_router(session_ref);
let host_and_port = std::env::var("HOST_AND_PORT").unwrap_or("0.0.0.0:9881".to_string());
let listener = tokio::net::TcpListener::bind(&host_and_port).await.unwrap();

info!("starting status service on http://{host_and_port}");
axum::serve(listener, status_router).await.unwrap();
}
```

For a full example, check out
the [simple-new-order](https://github.com/Validus-Risk-Management/hotfix/tree/main/examples/simple-new-order)
sample application.
5 changes: 4 additions & 1 deletion crates/hotfix-status/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
mod api;
mod data_provider;
#[cfg(feature = "ui")]
mod error;
#[cfg(feature = "ui")]
mod ui;
Expand Down Expand Up @@ -29,5 +30,7 @@ pub fn build_router<M: FixMessage>(session_ref: SessionRef<M>) -> Router {
pub fn build_router<M: FixMessage>(session_ref: SessionRef<M>) -> Router {
let data_provider = SessionDataProvider { session_ref };
let state = AppState { data_provider };
Router::new().nest("/api", build_api_router(state))
Router::new()
.nest("/api", build_api_router())
.with_state(state)
}
21 changes: 0 additions & 21 deletions crates/utils/Cargo.toml

This file was deleted.

84 changes: 0 additions & 84 deletions crates/utils/src/update_version.rs

This file was deleted.

7 changes: 0 additions & 7 deletions publish.sh

This file was deleted.