mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 18:07:58 +00:00
rpc servers CLI: add --max--subscriptions--per--connection + fix a few bugs (#11461)
* cli: fix RPC CLI nits * remove needless lines * cargo fmt * Update client/service/src/lib.rs Co-authored-by: James Wilson <james@jsdw.me> Co-authored-by: James Wilson <james@jsdw.me>
This commit is contained in:
@@ -115,6 +115,11 @@ pub struct RunCmd {
|
||||
#[clap(long)]
|
||||
pub rpc_max_response_size: Option<usize>,
|
||||
|
||||
/// Set the the maximum concurrent subscriptions per connection.
|
||||
/// Default is 1024.
|
||||
#[clap(long)]
|
||||
pub rpc_max_subscriptions_per_connection: Option<usize>,
|
||||
|
||||
/// Expose Prometheus exporter on all interfaces.
|
||||
///
|
||||
/// Default is local.
|
||||
@@ -459,6 +464,18 @@ impl CliConfiguration for RunCmd {
|
||||
Ok(self.rpc_max_payload)
|
||||
}
|
||||
|
||||
fn rpc_max_request_size(&self) -> Result<Option<usize>> {
|
||||
Ok(self.rpc_max_request_size)
|
||||
}
|
||||
|
||||
fn rpc_max_response_size(&self) -> Result<Option<usize>> {
|
||||
Ok(self.rpc_max_response_size)
|
||||
}
|
||||
|
||||
fn rpc_max_subscriptions_per_connection(&self) -> Result<Option<usize>> {
|
||||
Ok(self.rpc_max_subscriptions_per_connection)
|
||||
}
|
||||
|
||||
fn ws_max_out_buffer_capacity(&self) -> Result<Option<usize>> {
|
||||
Ok(self.ws_max_out_buffer_capacity)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user