Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
parity
Mirrored projects
jsonrpsee
Commits
8b2189a3
Unverified
Commit
8b2189a3
authored
Jul 25, 2022
by
Alexandru Vasile
Browse files
http: Add inner server data structure
Signed-off-by:
Alexandru Vasile
<
alexandru.vasile@parity.io
>
parent
e7dc80d0
Changes
1
Hide whitespace changes
Inline
Side-by-side
http-server/src/server.rs
View file @
8b2189a3
...
...
@@ -383,6 +383,33 @@ impl Future for ServerHandle {
}
}
/// Data required by the server to expose the a tower service.
#[derive(Debug,
Clone)]
struct
RPSeeSvcData
<
M
>
{
/// Remote server address.
remote_addr
:
Option
<
SocketAddr
>
,
/// Registered server methods.
methods
:
Methods
,
/// Access control.
acl
:
AccessControl
,
/// Tracker for currently used resources on the server.
resources
:
Resources
,
/// User provided middleware.
middleware
:
M
,
/// Health API.
health_api
:
Option
<
HealthApi
>
,
/// Max request body size.
max_request_body_size
:
u32
,
/// Max response body size.
max_response_body_size
:
u32
,
/// Max length for logging for request and response
///
/// Logs bigger than this limit will be truncated.
max_log_length
:
u32
,
/// Whether batch requests are supported by this server or not.
batch_requests_supported
:
bool
,
}
/// An HTTP JSON RPC server.
#[derive(Debug)]
pub
struct
Server
<
M
=
()
>
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment