Export new metrics for OpenFaaS Pro scaling

* Add service target metric
* Add service min replicas metric
* Add scale type metric

These combined allow new auto-scaling modes and parameters
for OpenFaaS Pro customers.

Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
This commit is contained in:
Alex Ellis (OpenFaaS Ltd)
2022-01-24 12:11:54 +00:00
committed by Alex Ellis
parent 34735d61d0
commit d85d5e7239
23 changed files with 235 additions and 472 deletions

View File

@ -4,18 +4,24 @@ import "net/http"
// HandlerSet can be initialized with handlers for binding to mux
type HandlerSet struct {
// Proxy invokes functions upstream
// Proxy invokes a function
Proxy http.HandlerFunc
// DeployFunction deploys a new function that isn't already deployed
DeployFunction http.HandlerFunc
DeleteFunction http.HandlerFunc
ListFunctions http.HandlerFunc
Alert http.HandlerFunc
// DeleteFunction deletes a function that is already deployed
DeleteFunction http.HandlerFunc
// ListFunctions lists all deployed functions in a namespace
ListFunctions http.HandlerFunc
Alert http.HandlerFunc
// UpdateFunction updates an existing function
UpdateFunction http.HandlerFunc
// QueryFunction queries the metdata for a function
QueryFunction http.HandlerFunc
// FunctionStatus returns the status of an already deployed function
FunctionStatus http.HandlerFunc
// QueuedProxy queue work and return synchronous response
QueuedProxy http.HandlerFunc