Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update to use Arc of redis connection manager #3

Merged

Conversation

megsdevs
Copy link

No description provided.

@linear
Copy link

linear bot commented Aug 17, 2023

VAL-727 Shared application state layer in Trade API

We need to add a shared application state layer similar to what exists in quay for sharing the redis, postgres, rpc provider, back to trade API.

Was removed here: https://github.com/valorem-labs-inc/trade-api/pull/108/files#diff-ff98fb2eda600f0f020126216e6a8052beb293983bcf4c4e0002eb27940543edL67

https://github.com/valorem-labs-inc/trade-api/pull/108/files#diff-87619baf236177a7a9fc38150961151b7583b6f2f082ade75915f3ac4ca49c41

Files to edit:

src/state.rs src/startup.rs

The provider should contain a hashmap of chain ID to an arc of a provider.

https://docs.rs/tower/latest/tower/trait.Layer.html

That state layer can then be extracted during function calls.

The idea is that any application service may need to access redis, postgres, the RPC provider.

@codecov
Copy link

codecov bot commented Aug 17, 2023

Codecov Report

Merging #3 (44fd902) into main (77908db) will decrease coverage by 0.06%.
The diff coverage is 80.00%.

@@            Coverage Diff             @@
##             main       #3      +/-   ##
==========================================
- Coverage   88.94%   88.88%   -0.06%     
==========================================
  Files           1        1              
  Lines         208      207       -1     
==========================================
- Hits          185      184       -1     
  Misses         23       23              
Files Changed Coverage Δ
src/lib.rs 88.88% <80.00%> (-0.06%) ⬇️

@0xAlcibiades 0xAlcibiades merged commit bf4d9bd into main Aug 17, 2023
1 of 3 checks passed
@0xAlcibiades 0xAlcibiades deleted the megsdevs/val-727-shared-application-state-layer-in-trade-api branch August 17, 2023 20:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants