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

feat: support server-sent events #1

Merged
merged 21 commits into from
Apr 17, 2023
Merged

Conversation

Haswf
Copy link
Collaborator

@Haswf Haswf commented Apr 11, 2023

What type of PR is this?

feat: support server-sent event

What this PR does / why we need it (en: English/zh: Chinese):

en: feat: support server-sent events
zh: feat: 支持 server-sent events

Which issue(s) this PR fixes:

Fixes cloudwego/hertz#688

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
encoder.go Show resolved Hide resolved
go.mod Outdated Show resolved Hide resolved
sse_test.go Outdated Show resolved Hide resolved
sse_test.go Outdated Show resolved Hide resolved
examples/stockprice/main.go Outdated Show resolved Hide resolved
sse.go Outdated Show resolved Hide resolved
writer.go Show resolved Hide resolved
@Haswf
Copy link
Collaborator Author

Haswf commented Apr 11, 2023

需要补充一些单测,可以参考https://github.com/r3labs/sse

@li-jin-gou
Copy link
Contributor

❤️

decode.go Outdated Show resolved Hide resolved
we don't need decoder sse is server pushing events to client
encoder.go Outdated Show resolved Hide resolved
encoder.go Outdated Show resolved Hide resolved
encoder.go Outdated Show resolved Hide resolved
sse.go Outdated Show resolved Hide resolved
examples/main.go Outdated Show resolved Hide resolved
Copy link

@welkeyever welkeyever left a comment

Choose a reason for hiding this comment

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

LGTM, thx~

@welkeyever welkeyever merged commit 5b0bd5a into hertz-contrib:main Apr 17, 2023
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Proposal: add sse extension
3 participants