-
Notifications
You must be signed in to change notification settings - Fork 158
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
added output parameter to keep server stream open #70
base: master
Are you sure you want to change the base?
Conversation
naveen1100
commented
Apr 8, 2021
- This PR provides an option to keep sending the same data from the server to the client without disconnecting the stream. This is used to mock long-running server streams
- In addition it contains changes in Dockefile since the existing Dockerfile doesn't seem to work
stream open
@@ -1,18 +1,23 @@ | |||
FROM golang:alpine | |||
|
|||
FROM golang:1.15.3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what requires this PR to use this golang version?
if !KeepServerStreamOpen { | ||
return nil | ||
} | ||
time.Sleep(25 * time.Second) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is it 25 seconds?
Error string `json:"error"` | ||
Data interface{} `json:"data"` | ||
Error string `json:"error"` | ||
KeepServerStreamOpen bool `json:"keepServerStreamOpen"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need to put it under Meta
field, and instead of boolean, it should receive duration.