-
Notifications
You must be signed in to change notification settings - Fork 13
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
[Miner] feat: add events query client #64
Conversation
65a5f43
to
97432bb
Compare
97432bb
to
7ebb5fb
Compare
7ebb5fb
to
f7f9a32
Compare
e9c47f9
to
0d73bd8
Compare
6bc8e56
to
4f9f3ea
Compare
0439247
to
015e5ef
Compare
(cherry picked from commit 22371aa550eb0060b528f4573ba6908bbdfa0c1c)
* pokt/main: fix: RelayerProxy interface mismatch (#91) [RelayerProxy] feat: implement relayerProxy struct (#82) [AppGate] Scaffold undelegate-from-gateway message & nothing else (#86) [AppGate] Scaffold delegate-to-gateway message and nothing else (#85) [Supplier] Implement MsgUnstakeSupplier w/ Tests (#77) [Supplier] Implement MsgStakeSupplier & Add Extensive Tests (#76) [RelayerProxy] feat: add RelayerProxy interface (#80)
(cherry picked from commit ab21790164ab544ae5f1508d3237a3faab33e71e)
* feat/observable-map: feat: add the map channel observable operator
* merge/map_x_replay: fix: race chore: review improvements fix: comment typo fix: interface assertion test: improve and add tests chore: add warning log and improve comments [Miner] feat: add the map channel observable operator (#92)
…-client * pokt/feat/query-client: fix: interface assertions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Reviewed everything other than
pkg/client/events_query/client_test.go
- The base branch needs to be updated
- Still wrapping my head around all the different clients/components but it's slowly coming together
- I pushed some NITs to the README so please make sure to do a git pull
- Great job!
(cherry picked from commit 31555cdc68211964358c43842e0581f565d1afff)
(cherry picked from commit ccb1d6981f67ab860cb65dde4da15d89bcf57875)
This comment was marked as outdated.
This comment was marked as outdated.
|
||
import ( | ||
"github.com/gorilla/websocket" | ||
gorillaws "github.com/gorilla/websocket" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wasn't aware gorrilas have laws 🦍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few minor nits plus a request to #PUC, but otherwise lgtm!
Co-authored-by: Daniel Olshansky <[email protected]>
f8a753d
to
74ec7e8
Compare
* pokt/main: [Miner] feat: add events query client (#64)
* pokt/main: [Miner] feat: add events query client (#64)
* feat: add the map channel observable operator (cherry picked from commit 22371aa550eb0060b528f4573ba6908bbdfa0c1c) * feat: add replay observable (cherry picked from commit ab21790164ab544ae5f1508d3237a3faab33e71e) * chore: add query client interface * chore: add query client errors * test: fix false positive, prevent regression, & add comments * chore: add godoc comment * feat: add query client implementation * chore: add connection & dialer wrapper implementations * test: query client & add testquery helper pkg * chore: add go_test_integration make target * chore: add internal mocks pkg * test: query client integration test * docs: add event query client docs * chore: update go.mod * chore: re-order `eventsQueryClient` methods to improve readability * chore: add godoc comments to testclient helpers * fix: comment formatting * chore: improve comment & naming in evt query client test * test: tune events query client parameters * chore: improve godoc comments * chore: review improvements * refactor: `replayObservable` as its own interface type * refactor: `replayObservable#Next() V` to `ReplayObservable#Last(ctx, n) []V` * chore: add constructor func for `ReplayObservable` * test: reorder to improve readibility * refactor: rename and add godoc comments * chore: improve naming & comments * chore: add warning log and improve comments * test: improve and add tests * fix: interface assertion * fix: comment typo * chore: review improvements * fix: race * fix: race on eventsBytesAndConns map * fix: interface assertions Co-authored-by: Redouane Lakrache <[email protected]> * fix: race * Small updates to the README * chore: review improvements (cherry picked from commit 31555cdc68211964358c43842e0581f565d1afff) * refactor: eliminate `EventsQueryClient#requestId` field (cherry picked from commit ccb1d6981f67ab860cb65dde4da15d89bcf57875) * refactor: eliminate `EventsQueryClient#requestId` field * refactor: move websocket dialer and connection to own pkg * chore: add comment * chore: move `EventsBytesObservable type above interfaces * chore: review improvements * fix: bug & improve naming & comments * chore: review improvements * chore: review improvements * chore: add comment Co-authored-by: Daniel Olshansky <[email protected]> * revert: replay observable, merged into previous base branch --------- Co-authored-by: Redouane Lakrache <[email protected]> Co-authored-by: Daniel Olshansky <[email protected]>
@Reviewer
This PR may be more digestible / reviewable on a commit-by-commit basis. Commits are organized logically and any given line is only modified in a single commit, with few exceptions*.
*(In the interest of preserving the git-time-continuum 👮🚨, this applies in batches of commits between comments or reviews by humans, only once "in review")
Summary
Adds
EventsQueryClient
interface and implementation.Issue
Relates to:
QueryClient
is a nested dependency ofMiner
.Type of change
Select one or more:
Testing
make go_test_integration
Sanity Checklist