backport: add Events method to the client interface (#7982)#9519
Merged
sergio-mena merged 2 commits intotendermint:feature/adr075-backportfrom Oct 13, 2022
Merged
Conversation
- Update documentation to deprecate the old methods. - Add Events methods to HTTP, WS, and Local clients. - Add Events method to the light client wrapper. - Rename legacy events client to SubscriptionClient.
mmsqe
commented
Oct 7, 2022
| waitTime time.Duration, | ||
| ) (*ctypes.ResultEvents, error) | ||
|
|
||
| func makeEventsSearchFunc(c *lrpc.Client) rpcEventsSearchFunc { |
Author
There was a problem hiding this comment.
I need apply change to adapt non-primitive params without pattern change, since we can't get struct like filter or cursor directly from route without json parser refactor.
Contributor
There was a problem hiding this comment.
Do you know which PR the json parser refactor was?
Contributor
There was a problem hiding this comment.
ok, thanks. Noted it as an issue
cmwaters
approved these changes
Oct 10, 2022
rpc/client/interface.go
Outdated
| } | ||
|
|
||
| // TODO(creachadair): This interface should be removed once the streaming event | ||
| // interface is removed in Tendermint v0.37. |
Contributor
There was a problem hiding this comment.
Suggested change
| // interface is removed in Tendermint v0.37. | |
| // interface is removed in Tendermint v0.39. |
nit
| waitTime time.Duration, | ||
| ) (*ctypes.ResultEvents, error) | ||
|
|
||
| func makeEventsSearchFunc(c *lrpc.Client) rpcEventsSearchFunc { |
Contributor
There was a problem hiding this comment.
Do you know which PR the json parser refactor was?
sergio-mena
approved these changes
Oct 13, 2022
| } | ||
|
|
||
| func (c *Local) Events(ctx context.Context, req *ctypes.RequestEvents) (*ctypes.ResultEvents, error) { | ||
| return core.Events(c.ctx, req.Filter.Query, req.MaxItems, req.Before, req.After, req.WaitTime) |
Contributor
There was a problem hiding this comment.
Out of curiosity: #7982 implements the new functionality directly in this file, whereas this PR moves it inside the core package. Was there a reason?
Author
mmsqe
added a commit
to mmsqe/tendermint
that referenced
this pull request
Dec 9, 2022
…tendermint#9519) * rpc/client: add Events method to the client interface (tendermint#7982) - Update documentation to deprecate the old methods. - Add Events methods to HTTP, WS, and Local clients. - Add Events method to the light client wrapper. - Rename legacy events client to SubscriptionClient. * Apply suggestions from code review Co-authored-by: M. J. Fromberger <fromberger@interchain.io>
mmsqe
added a commit
to mmsqe/tendermint
that referenced
this pull request
Dec 9, 2022
…tendermint#9519) * rpc/client: add Events method to the client interface (tendermint#7982) - Update documentation to deprecate the old methods. - Add Events methods to HTTP, WS, and Local clients. - Add Events method to the light client wrapper. - Rename legacy events client to SubscriptionClient. * Apply suggestions from code review Co-authored-by: M. J. Fromberger <fromberger@interchain.io>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For the full description, see #7982
PR checklist
CHANGELOG_PENDING.mdupdated, or no changelog entry neededdocs/) and code comments, or nodocumentation updates needed