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
Merged

Implement Server Sent Events #60

merged 17 commits into from
Apr 23, 2020

Conversation

imclint21
Copy link
Member

Hey,

This is the first base of the SSE implementation!

Kind regards

@imclint21 imclint21 added help wanted Extra attention is needed core Core development API About the API developement feature About a new feature roadmap labels Mar 10, 2020
@imclint21 imclint21 added this to the alpha milestone Mar 10, 2020
@imclint21 imclint21 self-assigned this Mar 10, 2020
@imclint21 imclint21 linked an issue Mar 10, 2020 that may be closed by this pull request
@imclint21 imclint21 linked an issue Mar 10, 2020 that may be closed by this pull request
15 tasks
@imclint21 imclint21 removed a link to an issue Mar 10, 2020
15 tasks
@imclint21 imclint21 requested a review from shuni64 March 10, 2020 20:24
Cargo.toml Outdated Show resolved Hide resolved
src/configuration.rs Show resolved Hide resolved
@imclint21
Copy link
Member Author

imclint21 commented Mar 11, 2020

@CephalonRho, for SSE I use written this, we need to ensure that SEE is covered by JWT authentication if it's enabled, what I need to add below?

let sse = warp::path("notifications")
    .and(warp::get())
    .map(|| {
        warp::sse::reply(warp::sse::keep_alive()
            .stream(sse_events()))
    })
    .and(sse_enabled);

PS: sometimes we have verify_auth, sometimes check_webui I think that we need to uniform this!

src/server.rs Outdated

let (tx, rx) = mpsc::unbounded_channel();

tx.send(Message { data: String::from("lol") }).unwrap();
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@CephalonRho I don't understand these two lines if I remove it it does not works :/

@imclint21
Copy link
Member Author

imclint21 commented Mar 17, 2020

It works! (like said Apache)

Just some things to change:

An example of empty events:

Capture d’écran 2020-03-17 à 23 44 13

@imclint21
Copy link
Member Author

I Merge #60 to create a Lucid PoC.

@imclint21 imclint21 merged commit 72f8947 into master Apr 23, 2020
@imclint21 imclint21 deleted the feature-sse branch April 23, 2020 12:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API About the API developement core Core development feature About a new feature help wanted Extra attention is needed roadmap
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Manifest] Server Sent Events
2 participants