-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: Unify logic for generating Redis keys (#807)
Both the `IndexerState` and `IndexerConfig` structs are used individually to access Redis, and therefore have duplicate code for generating the required keys. This is problematic for the following reasons: 1. Redis access is limited to these structs, anything else requiring access needs to duplicate the logic again 2. Updates need to be reflected across both structs, creating more room for error This PR creates a common Redis `KeyProvider` interface/trait for accessing Indexer Redis data/keys. Now the required structs, i.e. `IndexerState` and `IndexerConfig`, can implement this trait, and automatically get access to the methods which generate the keys. Also did some minor clean up, removing the old Coordinator migration code.
- Loading branch information
1 parent
8c40b2e
commit 680c6c9
Showing
8 changed files
with
101 additions
and
155 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.