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

Add persistence, and refactor code to make it possible #89

Merged
merged 5 commits into from
Dec 3, 2024

Conversation

ainmosni
Copy link
Contributor

@ainmosni ainmosni commented Dec 3, 2024

This does the following:

  • Add a persistence package
  • Replace the archiver interface with one in the persistence package
  • Add a badger storage implementation
  • Bump go for badger dependency
  • Remove overly complicated tests
  • Move ContractNegotiations to their own package
  • Do the same to TransferRequests
  • Modify all the code to reflect the move
  • Add locking to the badger storage layer
  • Clean up code where it made sense

Fixes #26

This adds persistence options to RUN-DSP by doing the following:

- Bump Go to 1.23.3
- Add new storage interfaces
- Create badger implementation for new interfaces
- Make fields in contracts and transfer reqs public for storage.
- Add some helper methods to contracts and transfer request
This does the following:

- Move ContractNegotiations to their own package
- Do the same to TransferRequests
- Modify all the code to reflect the move
- Add locking to the badger storage layer
- Clean up code where it made sense
@ainmosni ainmosni marked this pull request as ready for review December 3, 2024 12:17
dsp/contract/negotiation.go Outdated Show resolved Hide resolved
dsp/contract/negotiation.go Outdated Show resolved Hide resolved
dsp/control/control.go Outdated Show resolved Hide resolved
dsp/transfer/state.go Outdated Show resolved Hide resolved
dsp/contract/doc.go Outdated Show resolved Hide resolved
@Excds Excds merged commit 39546c7 into main Dec 3, 2024
5 checks passed
@Excds Excds deleted the ainmosni/feature/persistence branch December 3, 2024 15:47
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.

Implement optional persistence
2 participants