-
Notifications
You must be signed in to change notification settings - Fork 119
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
Serializing mode sends nothing in stdin #47
Comments
Hi how did you decide to use of-watchdog for this? We already have an official PHP template with the classic watchdog that achieves the same thing. Alex |
You can't do that with the serialising mode, what gave you that impression? You must use http mode to set explicit headers. If that's something you need to do then look at my example template with of-watchdog and Swoole (PHP) https://github.com/alexellis/php7-swoole-template Alex |
Derek add label: support |
If you need help please join us on Slack as advised on the website. https://docs.openfaas.com/community - there you can join the #templates channel and chat with us more. |
Thanks for your replies.
The power of openfaas I think is the ability to use any docker images, and turn them into a powerfull FaaS in a microservices universe. The watchdog is a tiny layer, to make it happen. Ideally, the FaaS Dockerfile should be independant of the gateway, but this is a little compromise.
https://github.com/openfaas-incubator/of-watchdog/blob/master/README.md#L89 :
This line confuse me. Overall, multi modes confuses me, because i went into openfaas because the communication between gateway and function is very light and powerful. But, the way stdin and stdout are managed by watchdog depending of types is difficult for me. It would be great to pass http request as a standardized message into our functions in stdin, no matter of mode. Like :
We process the message, and send in stdout :
The watch dog transform this message into a proper HTTP response to the gateway. Also, this can trigger an event like :
And execute another function ... It would be a very clear interface between openfass and functions, and avoid confusion 😉 |
How serializing works ?
Expected Behaviour
Hi all, I use serializing mode, and I get nothing in STDIN (while streaming works).
Overall, how to use serializing mode ? I want to manipulate the stdin request and set status code, body, headers ... inside my handler, and send out to the stdout. I think it's the best suited mode, but i can get nothing.
Current Behaviour
With a PHP script :
Steps to Reproduce (for bugs)
This Dockerfile with the script above.
Context
I want to manipulate the stdin request and set status code, body, headers ... inside my function with stdout.
Your Environment
Docker 18.09.1
Docker swarm
macOs
PHP 7.3
The text was updated successfully, but these errors were encountered: