Skip to content

Instantly share code, notes, and snippets.

@viveksyngh
Last active July 29, 2018 12:41
Show Gist options
  • Select an option

  • Save viveksyngh/c3d16f0cb5f387c3fc45df6a641c0a8b to your computer and use it in GitHub Desktop.

Select an option

Save viveksyngh/c3d16f0cb5f387c3fc45df6a641c0a8b to your computer and use it in GitHub Desktop.
OpenFaaS function in a gist
package function
import (
"fmt"
)
// Handle a serverless request
func Handle(req []byte) string {
return fmt.Sprintf("Hello, Go. You said: %s", string(req))
}
provider:
name: faas
gateway: http://127.0.0.1:8080
functions:
gist-fn:
lang: go
handler: ./
image: gist-fn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment