-
Notifications
You must be signed in to change notification settings - Fork 271
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(http): split params types into a dedicated http-h2 crate
This sets up configuring ClientParams from the proxy-api-resolve crate, i.e. so that the proxy-api-resolve crate does not need to depend on the proxy-http crate.
- Loading branch information
Showing
6 changed files
with
63 additions
and
47 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[package] | ||
name = "linkerd-http-h2" | ||
version = "0.1.0" | ||
edition = "2021" | ||
publish = false | ||
description = "HTTP/2-specific configuration types" |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
use std::time::Duration; | ||
|
||
#[derive(Clone, Debug, Default, PartialEq, Eq)] | ||
pub struct ServerParams { | ||
pub flow_control: Option<FlowControl>, | ||
pub keep_alive: Option<KeepAlive>, | ||
pub max_concurrent_streams: Option<u32>, | ||
|
||
// Internals | ||
pub max_frame_size: Option<u32>, | ||
pub max_header_list_size: Option<u32>, | ||
pub max_pending_accept_reset_streams: Option<usize>, | ||
pub max_send_buf_size: Option<usize>, | ||
} | ||
|
||
#[derive(Clone, Debug, Default, Eq, PartialEq, Hash)] | ||
pub struct ClientParams { | ||
pub flow_control: Option<FlowControl>, | ||
pub keep_alive: Option<ClientKeepAlive>, | ||
|
||
// Internals | ||
pub max_concurrent_reset_streams: Option<usize>, | ||
pub max_frame_size: Option<u32>, | ||
pub max_send_buf_size: Option<usize>, | ||
} | ||
|
||
#[derive(Copy, Clone, Debug, Default, PartialEq, Eq)] | ||
pub struct KeepAlive { | ||
pub interval: Duration, | ||
pub timeout: Duration, | ||
} | ||
|
||
#[derive(Copy, Clone, Debug, Default, Eq, PartialEq, Hash)] | ||
pub struct ClientKeepAlive { | ||
pub interval: Duration, | ||
pub timeout: Duration, | ||
pub while_idle: bool, | ||
} | ||
|
||
#[derive(Copy, Clone, Debug, Eq, PartialEq, Hash)] | ||
pub enum FlowControl { | ||
Adaptive, | ||
Fixed { | ||
initial_stream_window_size: u32, | ||
initial_connection_window_size: u32, | ||
}, | ||
} |
This file contains 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
This file contains 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