Add namespaces endpoint

This is being added because multiple namespaces can now be used
on Kubernetes. By listing namespaces, a client such as the UI
or CLI can then enumerate the namespaces to find functions
which may span across more than one namespace.

Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
This commit is contained in:
Alex Ellis (OpenFaaS Ltd)
2019-09-21 17:59:12 +01:00
committed by Alex Ellis
parent 0488e510ee
commit 137b63e61f
5 changed files with 30 additions and 17 deletions

View File

@ -7,11 +7,13 @@ import (
// FaaSHandlers provide handlers for OpenFaaS
type FaaSHandlers struct {
FunctionReader http.HandlerFunc
DeployHandler http.HandlerFunc
// FunctionProxy provides the function invocation proxy logic. Use proxy.NewHandlerFunc to
// use the standard OpenFaaS proxy implementation or provide completely custom proxy logic.
FunctionProxy http.HandlerFunc
FunctionProxy http.HandlerFunc
FunctionReader http.HandlerFunc
DeployHandler http.HandlerFunc
DeleteHandler http.HandlerFunc
ReplicaReader http.HandlerFunc
ReplicaUpdater http.HandlerFunc
@ -19,10 +21,11 @@ type FaaSHandlers struct {
// LogHandler provides streaming json logs of functions
LogHandler http.HandlerFunc
// Optional: Update an existing function
UpdateHandler http.HandlerFunc
HealthHandler http.HandlerFunc
InfoHandler http.HandlerFunc
// UpdateHandler an existing function/service
UpdateHandler http.HandlerFunc
HealthHandler http.HandlerFunc
InfoHandler http.HandlerFunc
ListNamespaceHandler http.HandlerFunc
}
// FaaSConfig set config for HTTP handlers