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

Implement Server Sent Events #60

Merged
merged 17 commits into from
Apr 23, 2020
49 changes: 49 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ tree_magic = "0.2.1"
snafu = "0.6.2"
bytes = "0.5.3"
hex = "0.3.1"
futures = "*"
imclint21 marked this conversation as resolved.
Show resolved Hide resolved
fern = { version = "0.5.9", features = ["colored", "syslog-4"] }
clap = { version = "2.33.0", features = ["yaml"] }
warp = { version = "0.2.0", features = ["tls"] }
Expand Down
9 changes: 9 additions & 0 deletions src/configuration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ pub struct Configuration {
pub authentication: Authentication,
pub persistence: Persistence,
pub encryption: Encryption,
pub sse: ServerSentEvent,
pub webui: WebUI,
pub store: Store,
pub http: Http,
Expand Down Expand Up @@ -53,6 +54,9 @@ impl Default for Configuration {
private_key: hex::encode(rand::thread_rng().gen::<[u8; 24]>()),
iv: hex::encode(rand::thread_rng().gen::<[u8; 16]>()),
},
sse: ServerSentEvent {
enabled: false,
},
webui: WebUI { enabled: false },
store: Store { max_limit: 7340032 },
http: Http {
Expand Down Expand Up @@ -102,6 +106,11 @@ pub struct WebUI {
pub enabled: bool,
}

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct ServerSentEvent {
imclint21 marked this conversation as resolved.
Show resolved Hide resolved
pub enabled: bool,
}

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Store {
pub max_limit: u64,
Expand Down