Closed freak12techno closed 3 months ago
The recent changes introduce robust functionalities for handling inflation data within the application. Key additions include an inflation JSON configuration file, a dedicated fetcher and generator for inflation data, and an enhanced RPC structure for querying inflation metrics. These updates streamline data retrieval and monitoring, laying the groundwork for comprehensive financial analysis capabilities.
Files | Change Summary |
---|---|
assets/inflation.json | Added a JSON file with a high-precision inflation rate. |
pkg/app.go | Enhanced NewApp function by adding inflation fetcher and generator instances. |
pkg/constants/constants.go | Introduced FetcherNameInflation constant for improved data fetching. |
pkg/fetchers/inflation.go | Implemented InflationFetcher for fetching inflation data; added methods and struct definitions. |
pkg/fetchers/inflation_test.go | Added unit tests for the InflationFetcher functionality. |
pkg/generators/inflation.go | Defined InflationGenerator for generating inflation metrics; included methods for metric collection. |
pkg/generators/inflation_test.go | Added unit tests for the InflationGenerator functionality. |
pkg/tendermint/rpc.go | Introduced GetInflation method in RPC struct to fetch inflation data from a URL. |
pkg/types/tendermint.go | Added InflationResponse type to model inflation data responses. |
sequenceDiagram
participant User
participant App as Application
participant Fetcher as InflationFetcher
participant RPC as RPC Client
participant Generator as InflationGenerator
participant Metrics as Prometheus
User->>App: Request Inflation Data
App->>Fetcher: Fetch Inflation Data
Fetcher->>RPC: GetInflation()
RPC-->>Fetcher: Return InflationResponse
Fetcher-->>App: Provide Inflation Data
App->>Generator: Generate Metrics
Generator->>Metrics: Collect Inflation Metrics
Metrics-->>App: Metrics Updated
App-->>User: Respond with Inflation Data
π In fields of data, I hop and play,
With inflation metrics brightening the day.
Fetchers and generators, a wondrous sight,
Helping us measure with all of their might!
So letβs cheer for changes, both big and small,
A leap in our app, we celebrate all! π
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 100.00%. Comparing base (
058a297
) to head (4a1f2c4
).
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Summary by CodeRabbit
New Features
Bug Fixes
Tests
Documentation