- 12 Aug, 2022 1 commit
-
-
mwtian authored
* add len() to Params * Rename to `len_bytes()` Co-authored-by:
Niklas Adolfsson <niklasadolfsson1@gmail.com> * Update comment. Co-authored-by:
Niklas Adolfsson <niklasadolfsson1@gmail.com> * Update types/src/params.rs * Update types/src/params.rs * Update types/src/params.rs * Update types/src/params.rs Co-authored-by:
Niklas Adolfsson <niklasadolfsson1@gmail.com>
-
- 21 Jan, 2022 1 commit
-
-
Niklas Adolfsson authored
* feat(client): support request id as Strings. * add tests for Id::String * address grumbles: move id_kind to RequestManager * Update client/http-client/src/client.rs * types: take ref to `ID` get rid of some `Clone` * remove more clone * grumbles: rename tests
-
- 22 Dec, 2021 1 commit
-
-
Niklas Adolfsson authored
Implies MSRV 1.56.x
-
- 21 Dec, 2021 1 commit
-
-
Niklas Adolfsson authored
* PoC * introduce IdProvider trait * revert Cow stuff * Update ws-server/src/server.rs * fix tests * cargo fmt * use 'static lifetime in SubscriptionId * fix tests * fmt * make tests compile again * fix tests * Fix tests * Move IdProvider impls to own module * move `sub-id gen` types to `core` * fix doc links * make rand non-optional dep * feature gate: id provider Co-authored-by:
David Palm <dvdplm@gmail.com>
-
- 17 Dec, 2021 1 commit
-
-
Maciej Hirsz authored
* Nuke V2 * fmt * Formatting and imports * Updated benches * Fix doc comment link * Brace imports in ws-server * Reworking imports * std first * fmt * std on top * Update to match changed line numbers * Rename jsonrpsee_utils -> jsonrpsee_core * Migrating things types -> core * RpcError -> ErrorResponse * Merge types::client into core::client * Continued move types -> core * Removing features to make checks pass * Move rpc_module tests to tests crate * Fixed doc comment links * Add futures-util dependency for client * Remove dead code Co-authored-by:
Niklas Adolfsson <niklasadolfsson1@gmail.com> * fmt * Feature gate the Client trait * Move `Client` traits to `client` module Co-authored-by:
Niklas Adolfsson <niklasadolfsson1@gmail.com>
-
- 10 Dec, 2021 2 commits
-
-
James Wilson authored
* get the tests passing * cargo fmt * tweak comment wording * point to StreamExt in the next() method impl just so that people know to import it if desired * ignore clippy lint on next() Iterator-like method * Fix an example * actually, unwrap instead of transpose
-
Niklas Adolfsson authored
-
- 30 Nov, 2021 1 commit
-
-
Niklas Adolfsson authored
* fix(types): use `Cow` for deserializing `str` * use ToString
-
- 15 Oct, 2021 1 commit
-
-
Niklas Adolfsson authored
-
- 11 Oct, 2021 1 commit
-
-
Niklas Adolfsson authored
* fix(ParamsSer): serialize to empty array Serialize `ParamsSer::NoParams` to an empty array inorder to comply with the jsonrpc v2 spec. * fix tests * remove ParamsSer::NoParams * address grumbles: adjust rpc params macro
-
- 15 Sep, 2021 1 commit
-
-
David authored
* Renames * More renames * fmt * s/RpcParams/Params/ * Add a type alias `SubscriptionResponse` to `Notification` which is parametrized to `SubscriptionPayload` Move `SubscriptionResponse` to the `response` module * Fix doc links * Cleanup and some docs * Review feedback * cleanup
-
- 14 Sep, 2021 1 commit
-
-
David authored
* Add a test illustrating how to use the `call` convenience method * Extend test + review feedback * log * log * log * log * log * log * log * log * log * log * log * log * log * log * log * Add Methods::test_subscription Log more when params parsing fails * Add call_with test helper (ty @niklas!) + cleanup * Remove todo (part of https://github.com/paritytech/jsonrpsee/issues/457 ) * fmt * Let `test_subscription` be called from other crates * Manually fix indentation * fmt * SSself-review grumbles * CallError::InvalidParams carries an anyhow::Error * fmt * Tweak docs * Update utils/src/server/rpc_module.rs Co-authored-by:
Niklas Adolfsson <niklasadolfsson1@gmail.com> * review grumble * Fix todos * fmt * Fixup error messages * Include source in the error message for `CallError` * fmt * Update proc-macros/src/render_server.rs Co-authored-by:
Maciej Hirsz <1096222+maciejhirsz@users.noreply.github.com> * Mention needing jsonrpsee crate in scope * Resolve todo * Impl ToRpcParams for 0-sized array * optimized logging Co-authored-by:
Niklas Adolfsson <niklasadolfsson1@gmail.com> Co-authored-by:
Maciej Hirsz <1096222+maciejhirsz@users.noreply.github.com>
-
- 01 Sep, 2021 1 commit
-
-
Niklas Adolfsson authored
* treat empty json as no params when optional * add test with nested array brackets * address grumbles: better tests * Update types/src/v2/params.rs Co-authored-by:
David <dvdplm@gmail.com> * introduce RpcParams::sequence_ignore_empty * address grumbles: ignore empty json in RpcParams * Update proc-macros/src/render_server.rs * address grumbles: remove trim in next_inner() * address grumbles: trim_start after params.next() * address more grumbles * [proc macros]: add test for empty array * make proc macro kind of work * add hack to make it work in proc macros * add hack to make it work in proc macros * [] -> * revert cerebral palsy * Update proc-macros/tests/ui/correct/basic.rs * Update proc-macros/tests/ui/correct/basic.rs * address grumbles * improve is_option * add test for core::option::Option Co-authored-by:
David <dvdplm@gmail.com>
-
- 25 Aug, 2021 1 commit
-
-
David authored
* Add license headers where missing and update year * Update examples/http.rs Co-authored-by:
Niklas Adolfsson <niklasadolfsson1@gmail.com> Co-authored-by:
Niklas Adolfsson <niklasadolfsson1@gmail.com>
-
- 13 Aug, 2021 1 commit
-
-
Niklas Adolfsson authored
-
- 27 Jul, 2021 1 commit
-
-
Maciej Hirsz authored
* WIP * Feature-complete-ish * WIP * Cleaner replace marker * Inject lifetimes in elided `Cow`s * Use a single static &str for all injected lifetimes * Working lifetimes * Add the `call` method to `Methods` * Testing proc macro with optional params * Remove internal loop * fmt * Fix grumbles
-
- 10 Jul, 2021 1 commit
-
-
David authored
* Pass OwnedRpcParams to async methods * Cow-ified RpcParams * fmt * Separate `RpcParamsSequence` parser from `RpcParams` * Remove OwnedId, use Id<'static> instead * Ensure that parsed `Id` is borrowing from input slice * Tweak/add some docs Test that parse() works after calling sequence() * Fix rustdoc link Co-authored-by:
Maciej Hirsz <hello@maciej.codes>
-
- 01 Jul, 2021 2 commits
-
-
Igor Aleksanov authored
* Start working on the new proc macro system * Add skeleton for rendering * Improve error reporting * Main part of 'render_client' * Implement RPC client generation * Client successfully rendered * Add doc-comment generation for the API client * Check that all the methods have receiver * Start working on the server impl * Add helper method to find server crate * Fix usage of client rpc path * Decent progress on the server macro implementation * Server macro compiled successfully * Remove unneeded re-export * Insert SubscriptionSink argument to the subscription server signatures * Add basic doc-comment for the macro * no_run -> ignore * Trait with subscription compiles * Extend the example * Add integration test for client/server impl * Add trybuild setup * Set correct span for attribute parsing related errors * Add basic set of trybuild tests * Add tests for client and server generated separately * Improve proc-macro documentation * Update proc-macros/src/lib.rs Co-authored-by:
Niklas Adolfsson <niklasadolfsson1@gmail.com> * Fix a couple of bugs in docs * Fix rendering subscription with params Co-authored-by:
Niklas Adolfsson <niklasadolfsson1@gmail.com>
-
Maciej Hirsz authored
* Streaming RpcParams parsing * DRY RpcParams::one again * Fix doc comments
-
- 24 Jun, 2021 1 commit
-
-
Niklas Adolfsson authored
* [jsonrpsee types]: unify types + more tests * address grumbles
-
- 02 Jun, 2021 1 commit
-
-
David authored
* Misc async methods tinkerings * Update utils/src/server/rpc_module.rs Co-authored-by:
Niklas Adolfsson <niklasadolfsson1@gmail.com> * Update types/src/v2/params.rs Co-authored-by:
Niklas Adolfsson <niklasadolfsson1@gmail.com> * Fix review grumbles * fmt Co-authored-by:
Niklas Adolfsson <niklasadolfsson1@gmail.com>
-
- 01 Jun, 2021 1 commit
-
-
Igor Aleksanov authored
* Add basic support for async methods * Add support of async methods into ws server * Add support of async methods to HTTP server * Fix subscriptions method lookup * Remove type that appeared to be unused * Add comment on safety of unwrap in OwnedJsonRpcRequest::borrowed * Update utils/src/server/rpc_module.rs Co-authored-by:
Niklas Adolfsson <niklasadolfsson1@gmail.com> Co-authored-by:
Maciej Hirsz <1096222+maciejhirsz@users.noreply.github.com> Co-authored-by:
Niklas Adolfsson <niklasadolfsson1@gmail.com>
-
- 28 May, 2021 1 commit
-
-
Niklas Adolfsson authored
* [ws server]: draft SubscriptionSinkWithParams * rexport types * PoC design2 * improve example * Update ws-server/src/server.rs Co-authored-by:
David <dvdplm@gmail.com> * Subscription example (#324) * Add a test for calling methods with multiple params of multiple types (#308) * Add a test for calling methods with multiple params of multiple types * cargo fmt Co-authored-by:
Niklas Adolfsson <niklasadolfsson1@gmail.com> * [ws client] RegisterNotification support (#303) * Rename NotifResponse to SubscriptionResponse to make room for new impl * Add support for on_notification Subscription<T> types * Fix handling of NotificationHandler in manager * cleanup * Implement NotificationHandler to replace Subscription<T> and clean up plumbing * More cleanup * impl Drop for NotificationHandler * Address pr feedback #1 * ws client register_notification pr feedback 2 * Fix doc * fix typo * Add tests, get NH working * More cleanup of String/&str * fix doc * Drop notification handler on send_back_sink error * ws client notification auto unsubscribe when channel full test * Change order of type params to register_method (#312) * Change order of type params to register_method * Cleanup and fmt * Update ws-server/src/tests.rs Co-authored-by:
Niklas Adolfsson <niklasadolfsson1@gmail.com> * CI: optimize caching (#317) * Bump actions/checkout from 2 to 2.3.4 (#315) Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 2.3.4. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v2...v2.3.4 ) Signed-off-by:
dependabot[bot] <support@github.com> Co-authored-by:
dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump actions-rs/cargo from 1 to 1.0.3 (#314) Bumps [actions-rs/cargo](https://github.com/actions-rs/cargo) from 1 to 1.0.3. - [Release notes](https://github.com/actions-rs/cargo/releases) - [Changelog](https://github.com/actions-rs/cargo/blob/master/CHANGELOG.md) - [Commits](https://github.com/actions-rs/cargo/compare/v1...v1.0.3 ) Signed-off-by:
dependabot[bot] <support@github.com> Co-authored-by:
dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump actions-rs/toolchain from 1 to 1.0.7 (#313) Bumps [actions-rs/toolchain](https://github.com/actions-rs/toolchain) from 1 to 1.0.7. - [Release notes](https://github.com/actions-rs/toolchain/releases) - [Changelog](https://github.com/actions-rs/toolchain/blob/master/CHANGELOG.md) - [Commits](https://github.com/actions-rs/toolchain/compare/v1...v1.0.7 ) Signed-off-by:
dependabot[bot] <support@github.com> Co-authored-by:
dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * [ws server]: add logs (#319) * WIP - hangs * fix example * cleanup * Add certificate_store() to WsClientBuilder (#321) * Add custom_certificate to WsClientBuilder * Use system certs instead of specified file * Cache client_config * Move client_config logic to fn build * Default use_system_certificates to true * Move out connector * Add CertificateStore type * cargo fmt * cargo clippy * Resolve comment: Rename variable * Resolved comments Co-authored-by:
Niklas Adolfsson <niklasadolfsson1@gmail.com> Co-authored-by:
Billy Lindeman <billylindeman@gmail.com> Co-authored-by:
Denis Pisarev <denis.pisarev@parity.io> Co-authored-by:
dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by:
Albin Hedman <albin9604@gmail.com> * grumbles: impl maciej proposal * fix test build * add test for subscription with param * cargo fmt * Update examples/ws_subscription.rs Co-authored-by:
David <dvdplm@gmail.com> * Update utils/src/server/rpc_module.rs Co-authored-by:
David <dvdplm@gmail.com> * Update utils/src/server/rpc_module.rs Co-authored-by:
David <dvdplm@gmail.com> * Update utils/src/server/rpc_module.rs Co-authored-by:
David <dvdplm@gmail.com> * Update utils/src/server/rpc_module.rs Co-authored-by:
David <dvdplm@gmail.com> * Update utils/src/server/rpc_module.rs Co-authored-by:
David <dvdplm@gmail.com> * grumbles * Update utils/src/server/rpc_module.rs Co-authored-by:
David <dvdplm@gmail.com> * Update utils/src/server/rpc_module.rs Co-authored-by:
David <dvdplm@gmail.com> * Update utils/src/server/rpc_module.rs Co-authored-by:
Maciej Hirsz <1096222+maciejhirsz@users.noreply.github.com> * fix more grumbles * [subscriptionSink]: introduce into_sinks * use replace * fix more nits * maciej design 2 * fix tests * remove log * [rpc context mod]: register_subscription with ctx * nits * nits again * move subscribers mutex * clippy * [ws subscribe]: avoid send message on unsubscribed * revert unintentional changes * Subscription with context example (#345) * Add weather example to show how to use subscriptions with context * Add note * Cleanup * Additional cleanup (#347) * Add weather example to show how to use subscriptions with context * Add note * Cleanup * fmt * Cleanup and docs * fmt * ignore error on subscription Co-authored-by:
David Palm <dvdplm@gmail.com> Co-authored-by:
Billy Lindeman <billylindeman@gmail.com> Co-authored-by:
Denis Pisarev <denis.pisarev@parity.io> Co-authored-by:
dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by:
Albin Hedman <albin9604@gmail.com> Co-authored-by:
Maciej Hirsz <1096222+maciejhirsz@users.noreply.github.com>
-
- 19 May, 2021 2 commits
-
-
Igor Aleksanov authored
-
Niklas Adolfsson authored
* get started * add additional test * fix nits * cargo fmt * [types]: write some tests. * [http server]: send empty response on notifs * [http server]: fix tests * [rpc module]: send subscription response * Update types/src/v2/error.rs * fix nits * cargo fmt * Update types/src/v2/params.rs * remove needless clone * remove dead code * [types]: impl PartialEq for JsonErrorObject + test * use beef::Cow * Update http-server/src/tests.rs
-
- 18 May, 2021 1 commit
-
-
Niklas Adolfsson authored
* [rpc server]: extract rpc_module to utils. This commit extracts the `rpc_module` from the servers to be shared. It will help to re-use rpc modules within both the servers * Update utils/src/server/rpc_module.rs Co-authored-by:
David <dvdplm@gmail.com> * Update utils/src/server/rpc_module.rs Co-authored-by:
David <dvdplm@gmail.com> * Update utils/src/server/mod.rs Co-authored-by:
David <dvdplm@gmail.com> * Update utils/src/server/rpc_module.rs Co-authored-by:
David <dvdplm@gmail.com> * Update utils/src/server/rpc_module.rs Co-authored-by:
David <dvdplm@gmail.com> * Update utils/src/server/rpc_module.rs Co-authored-by:
David <dvdplm@gmail.com> * Update utils/src/server/rpc_module.rs Co-authored-by:
David <dvdplm@gmail.com> * Update utils/src/server/rpc_module.rs Co-authored-by:
David <dvdplm@gmail.com> * Update utils/src/server/rpc_module.rs Co-authored-by:
David <dvdplm@gmail.com> * Update utils/src/server/rpc_module.rs Co-authored-by:
David <dvdplm@gmail.com> * address grumbles * fix build * fix docs * cargo fmt * Update utils/src/server/rpc_module.rs Co-authored-by:
David <dvdplm@gmail.com> * grumbles: use MethodSink * Update utils/src/server/mod.rs Co-authored-by:
David <dvdplm@gmail.com> * Update utils/src/server/rpc_module.rs Co-authored-by:
David <dvdplm@gmail.com> * Update utils/src/server/rpc_module.rs Co-authored-by:
David <dvdplm@gmail.com> Co-authored-by:
David <dvdplm@gmail.com>
-
- 04 May, 2021 2 commits
-
-
Niklas Adolfsson authored
* ret err if context/params fails * address grumbles: specific error_code context fail * address grumbles: make env_logger dev-dependency * address grumbles: add tests * chore(deps): remove unused deps * address grumbles: rename types and docs * address grumbles: more renaming. * fix build
-
David authored
* WIP * Implement draft of batch requests * fmt * cleanup * Explain why we don't use an untagged enum * Avoid allocating a Vec for single requets * Add comment * Add a benchmark for batch requests * Add more tests, noting where we diverge from the spec Fix empty batch case, i.e. `[]` * Obey the fmt * Update benches/bench.rs Co-authored-by:
Andrew Plaza <aplaza@liquidthink.net> * Update http-server/src/server.rs Co-authored-by:
Andrew Plaza <aplaza@liquidthink.net> * Add link to issue * Explain why we're closing the receiving end of the channel. * Limit logging of requests and response to 1kb Add more comments Factor out batch response collection * Wrap comment * tweak log line * Benchmark batch request over different batch sizes * fmt Co-authored-by:
Andrew Plaza <aplaza@liquidthink.net>
-
- 28 Apr, 2021 1 commit
-
-
Niklas Adolfsson authored
-
- 20 Apr, 2021 1 commit
-
-
Niklas Adolfsson authored
* rewrite me * v2 * PoC works without batch request * remove `PartialEq` bounds * add naive benches types * misc * remove useless lifetime * [ws client]: move request ID generation to client * make tests compile again * [client transport]: kill leaky abstractions. * [http client transport]: minor changes in the API. * [ws client]: fix batch requests. * fix nits * [ws client]: generate two request IDs for subscrib * fix tests * remove unused types + less alloc for params. * fix nits * more tweaks. * remove unused code * fix more nits * remove unused legacy types * reorg types_v2 mod * port macros to new types * fix tests again; more jsonvalue * [proc macros]: bring back impl Into for params. * fix build * [proc macros]: make it work for external crates. * [types]: remove weird From<Option<T>> to impl. * cleanup again * [examples]: remove unused async-std dep * Update types/src/v2/mod.rs * [types]: remove unsed dep smallvec * rewrite me * [types]: error code impl ser/deser Manual implementation of serialize/deserialize to get rid of duplicated message string * [types v2]: re-org with explicit mods * fix faulty test * add missed files * [ws client]: req_manager reserve unsubscribe slot. * simplify test code * add tracking issue for TODO * remove unused deps
-