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

rpc module: refactor calls/subs without a server #591

Merged
merged 13 commits into from
Dec 10, 2021

Conversation

niklasad1
Copy link
Member

@niklasad1 niklasad1 commented Dec 6, 2021

This PR does the following:

  • Remove call_with and call_with_subscription (these are confusing)
  • Change call to return a typed response instead of json string.
  • Change test_subscription to subscription
  • Introduce raw_json_request to just accept as JSON String that can be either subscription or call then just return raw json text as response.

Note, we don't have anything that supports calls with parameters as JSON Object besides doing raw json...

Any better ideas?!

utils/src/server/rpc_module.rs Outdated Show resolved Hide resolved
utils/src/server/rpc_module.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@dvdplm dvdplm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is better than what we had, sorry for making confused comments. :)

utils/src/server/rpc_module.rs Outdated Show resolved Hide resolved
utils/src/server/rpc_module.rs Outdated Show resolved Hide resolved
@niklasad1 niklasad1 marked this pull request as ready for review December 9, 2021 11:20
@niklasad1 niklasad1 requested a review from a team as a code owner December 9, 2021 11:20
Copy link
Collaborator

@jsdw jsdw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, and I love the added docs :)

@niklasad1 niklasad1 merged commit a8ad574 into master Dec 10, 2021
@niklasad1 niklasad1 deleted the na-refactor-rpc-module-calls-subs branch December 10, 2021 17:28
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.

None yet

3 participants