File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -15,19 +15,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1515
1616### Other
1717
18- - Fix initial creation time setting in redb store
19- - Add check for code formatting
20- - Add code coverage badge
21- - Update version to 0.0.21 to release DynamoDB stores
22- - Prepare for 0.0.19 release
23- - Update README with Test Requests
24- - Update README with next steps
25- - Process backlog of messages when a resend is completed
26- - Update README
27- - Nicer API for manipulating groups and example application using repeating groups
28- - Add badges
29- - Update crates in preparation for 0.0.11 release
30- - Switch to internal fork of ferrumfix for message encoding and decoding
31- - Use fix44 types for message generation
32- - Prepare project for crates.io publishing
33- - Initial commit
18+ - initial release
Original file line number Diff line number Diff line change 11[package ]
22name = " hotfix-status"
33description = " Status endpoints and an option web-based dashboard for the HotFIX engine"
4- version.workspace = true
4+ version = " 0.1.0 "
55authors.workspace = true
66edition.workspace = true
77license.workspace = true
8- readme.workspace = true
8+ readme = " README.md "
99homepage.workspace = true
1010repository.workspace = true
1111keywords.workspace = true
Original file line number Diff line number Diff line change 1+ <div align =" center " >
2+
3+ # hotfix-status
4+
5+ ** Status APIs and UI for the HotFIX engine.**
6+
7+ </div >
8+
9+ This crate is an add-on for the [ HotFIX engine] ( https://github.com/Validus-Risk-Management/hotfix )
10+ to provide useful APIs about the FIX session state and health.
11+
12+ Optionally, it also provides a web-based UI to view and manage the session state.
13+
14+ ## Usage
15+
16+ ` hotfix-status ` build an ` axum ` router you can embed in your application in any way you like.
17+
18+ To build the router, just call ` build_router ` with the HotFIX session ref:
19+
20+ ``` rust
21+ ...
22+
23+ use hotfix_status :: build_router;
24+
25+ ...
26+
27+ async fn start_status_service (session_ref : SessionRef <Message >) {
28+ let status_router = build_router (session_ref );
29+ let host_and_port = std :: env :: var (" HOST_AND_PORT" ). unwrap_or (" 0.0.0.0:9881" . to_string ());
30+ let listener = tokio :: net :: TcpListener :: bind (& host_and_port ). await . unwrap ();
31+
32+ info! (" starting status service on http://{host_and_port}" );
33+ axum :: serve (listener , status_router ). await . unwrap ();
34+ }
35+ ```
36+
37+ For a full example, check out
38+ the [ simple-new-order] ( https://github.com/Validus-Risk-Management/hotfix/tree/main/examples/simple-new-order )
39+ sample application.
Original file line number Diff line number Diff line change 11mod api;
22mod data_provider;
3+ #[ cfg( feature = "ui" ) ]
34mod error;
45#[ cfg( feature = "ui" ) ]
56mod ui;
@@ -29,5 +30,7 @@ pub fn build_router<M: FixMessage>(session_ref: SessionRef<M>) -> Router {
2930pub fn build_router < M : FixMessage > ( session_ref : SessionRef < M > ) -> Router {
3031 let data_provider = SessionDataProvider { session_ref } ;
3132 let state = AppState { data_provider } ;
32- Router :: new ( ) . nest ( "/api" , build_api_router ( state) )
33+ Router :: new ( )
34+ . nest ( "/api" , build_api_router ( ) )
35+ . with_state ( state)
3336}
Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments