Add OpenFaaS function pattern examples in Go, Python, and Node.js - #1
Add OpenFaaS function pattern examples in Go, Python, and Node.js#1welteki wants to merge 1 commit into
Conversation
Signed-off-by: Han Verstraete (OpenFaaS Ltd) <han@openfaas.com>
55ba65b to
2d3c904
Compare
This comment has been minimized.
This comment has been minimized.
AI Pull Request OverviewDisclaimer: This review was generated by automated AI and may contain errors. Do not trust its outputs without human verification. Summary
Approval rating (1-10)7/10. The examples are mostly coherent, but the Go documentation misses a required template setup step for first-time users. Summary per fileSummary per file
Overall AssessmentThe PR is close to mergeable from a code-structure perspective: the examples are self-contained, validate inputs, set downstream timeouts, and include tests around the main control-flow paths. The main issue is documentation reproducibility for the Go examples. The Go stacks use Detailed ReviewDetailed ReviewMedium: Go quickstarts omit the required template pull stepThe root README starts the example flow with The Python and Node READMEs already include the corresponding faas-cli template store pull golang-middleware
faas-cli up --tag=digestApply the same setup step to the root Go quickstart or add a shared prerequisite that explicitly covers the Go template. AI agent details. |
Description
Adds self-contained example functions for the three OpenFaaS function patterns : Director, Fan-out, and Singleton, in Go, Python, and Node.js. Each example ships with its own
stack.yamland function directories so it can be built and deployed independently withfaas-cli up.telemetry-workflowvalidates a sensor reading, invokes temperature and battery checks in parallel, and combines the results into anokoralertresponse.fan-outsubmits each URL in a batch as an asyncurl-checkinvocation and returns a summary immediately.notification-hubbroadcasts to all open SSE clients while scaling labels keep a single replica running.Motivation and context
Adds example functions for the Director, Fan-out, and Singleton patterns, as referenced in the OpenFaaS docs.
How has this been tested
All example functions have been built and deployed to an OpenFaaS cluster and tested with the invocation instructions described in the corresponding OpenFaaS docs pages.