Return not implemented for logs

Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
This commit is contained in:
Alex Ellis (OpenFaaS Ltd) 2020-02-23 20:50:24 +00:00
parent 137d199cb5
commit dc8667d36a

View File

@ -9,13 +9,13 @@ import (
"os" "os"
"path" "path"
"github.com/openfaas/faasd/pkg/cninetwork"
"github.com/openfaas/faasd/pkg/provider/config"
"github.com/openfaas/faasd/pkg/provider/handlers"
"github.com/containerd/containerd" "github.com/containerd/containerd"
bootstrap "github.com/openfaas/faas-provider" bootstrap "github.com/openfaas/faas-provider"
"github.com/openfaas/faas-provider/proxy" "github.com/openfaas/faas-provider/proxy"
"github.com/openfaas/faas-provider/types" "github.com/openfaas/faas-provider/types"
"github.com/openfaas/faasd/pkg/cninetwork"
"github.com/openfaas/faasd/pkg/provider/config"
"github.com/openfaas/faasd/pkg/provider/handlers"
"github.com/spf13/cobra" "github.com/spf13/cobra"
) )
@ -81,6 +81,14 @@ func runProvider(_ *cobra.Command, _ []string) error {
InfoHandler: handlers.MakeInfoHandler(Version, GitCommit), InfoHandler: handlers.MakeInfoHandler(Version, GitCommit),
ListNamespaceHandler: listNamespaces(), ListNamespaceHandler: listNamespaces(),
SecretHandler: handlers.MakeSecretHandler(client, userSecretPath), SecretHandler: handlers.MakeSecretHandler(client, userSecretPath),
LogHandler: func(w http.ResponseWriter, r *http.Request) {
if r.Body != nil {
defer r.Body.Close()
}
w.WriteHeader(http.StatusNotImplemented)
w.Write([]byte(`Logs are not implemented for faasd`))
},
} }
log.Printf("Listening on TCP port: %d\n", *config.TCPPort) log.Printf("Listening on TCP port: %d\n", *config.TCPPort)