mirror of
https://github.com/openfaas/faasd.git
synced 2025-06-08 08:05:03 +00:00
* Fixes upstream deprecations for containerd * Fixes deprecations in ioutil package usage * Break out separate files for function handlers * Upgrades containerd to 1.7.22 * Fixes default namespace functionality * Pre-deploy checks as per license agreement * Removes extra log messages for payload in HTTP handlers, you can enable FAAS_DEBUG=1 in the CLI instead to see this from the client's perspective * Add additional Google DNS server 8.8.4.4 for functions Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
31 lines
452 B
Go
31 lines
452 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"os"
|
|
|
|
"github.com/openfaas/faasd/cmd"
|
|
)
|
|
|
|
func main() {
|
|
|
|
if _, ok := os.LookupEnv("CONTAINER_ID"); ok {
|
|
collect := cmd.RootCommand()
|
|
collect.SetArgs([]string{"collect"})
|
|
collect.SilenceUsage = true
|
|
collect.SilenceErrors = true
|
|
|
|
err := collect.Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, err.Error())
|
|
os.Exit(1)
|
|
}
|
|
os.Exit(0)
|
|
}
|
|
|
|
if err := cmd.Execute(); err != nil {
|
|
os.Exit(1)
|
|
}
|
|
return
|
|
}
|