From a6dbb4cd0285f6dbc0bc3f43f72ceacdbdf6f227 Mon Sep 17 00:00:00 2001 From: "Alex Ellis (OpenFaaS Ltd)" Date: Thu, 11 Mar 2021 21:06:33 +0000 Subject: [PATCH] Update faas-provider to include new field Includes CreatedAt Signed-off-by: Alex Ellis (OpenFaaS Ltd) --- gateway/go.mod | 2 +- gateway/go.sum | 8 ++------ .../github.com/openfaas/faas-provider/types/model.go | 10 +++++++++- gateway/vendor/modules.txt | 2 +- 4 files changed, 13 insertions(+), 9 deletions(-) diff --git a/gateway/go.mod b/gateway/go.mod index eb774070..46d6aa62 100644 --- a/gateway/go.mod +++ b/gateway/go.mod @@ -8,7 +8,7 @@ require ( github.com/nats-io/jwt v1.2.2 // indirect github.com/nats-io/nats-streaming-server v0.20.0 // indirect github.com/nats-io/stan.go v0.8.2 // indirect - github.com/openfaas/faas-provider v0.17.0 + github.com/openfaas/faas-provider v0.17.3 github.com/openfaas/nats-queue-worker v0.0.0-20200512211843-8e9eefd5a320 github.com/prometheus/client_golang v1.9.0 github.com/prometheus/client_model v0.2.0 diff --git a/gateway/go.sum b/gateway/go.sum index e1ab295a..91580097 100644 --- a/gateway/go.sum +++ b/gateway/go.sum @@ -213,7 +213,6 @@ github.com/nats-io/jwt v0.3.2/go.mod h1:/euKqTS1ZD+zzjYrY7pseZrTtWQSjujC7xjPc8wL github.com/nats-io/jwt v1.1.0/go.mod h1:n3cvmLfBfnpV4JJRN7lRYCyZnw48ksGsbThGXEk4w9M= github.com/nats-io/jwt v1.2.2 h1:w3GMTO969dFg+UOKTmmyuu7IGdusK+7Ytlt//OYH/uU= github.com/nats-io/jwt v1.2.2/go.mod h1:/xX356yQA6LuXI9xWW7mZNpxgF2mBmGecH+Fj34sP5Q= -github.com/nats-io/nats-server/v2 v2.1.2 h1:i2Ly0B+1+rzNZHHWtD4ZwKi+OU5l+uQo1iDHZ2PmiIc= github.com/nats-io/nats-server/v2 v2.1.2/go.mod h1:Afk+wRZqkMQs/p45uXdrVLuab3gwv3Z8C4HTBu8GD/k= github.com/nats-io/nats-server/v2 v2.1.9 h1:Sxr2zpaapgpBT9ElTxTVe62W+qjnhPcKY/8W5cnA/Qk= github.com/nats-io/nats-server/v2 v2.1.9/go.mod h1:9qVyoewoYXzG1ME9ox0HwkkzyYvnlBDugfR4Gg/8uHU= @@ -239,10 +238,8 @@ github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+W github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= -github.com/openfaas/faas-provider v0.16.2 h1:ChpiZh1RM8zFIzvp31OPlKpTbh5Lcm7f91WCFcpW4gA= -github.com/openfaas/faas-provider v0.16.2/go.mod h1:fq1JL0mX4rNvVVvRLaLRJ3H6o667sHuyP5p/7SZEe98= -github.com/openfaas/faas-provider v0.17.0 h1:4rT8CosKhI5xaAMqbyihEgR6KefO/ViJdF0a8THTgwM= -github.com/openfaas/faas-provider v0.17.0/go.mod h1:fq1JL0mX4rNvVVvRLaLRJ3H6o667sHuyP5p/7SZEe98= +github.com/openfaas/faas-provider v0.17.3 h1:LN76lrXUKAx27o5X8l+daKWEzsdiW2E99jMOlI1SO5Q= +github.com/openfaas/faas-provider v0.17.3/go.mod h1:fq1JL0mX4rNvVVvRLaLRJ3H6o667sHuyP5p/7SZEe98= github.com/openfaas/nats-queue-worker v0.0.0-20200512211843-8e9eefd5a320 h1:rgNxl8VqfRh/2iZLO0OjcOo7D+BUcZrBMTPBUYCB1pY= github.com/openfaas/nats-queue-worker v0.0.0-20200512211843-8e9eefd5a320/go.mod h1:BfT8MB890hbhbtPid+X/oU0HAznGFS581NiG2hkr8Rc= github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= @@ -357,7 +354,6 @@ golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200323165209-0ec3e9974c59/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 h1:psW17arqaxU48Z5kZ0CQnkZWQJsqcURM6tKiBApRjXI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897 h1:pLI5jrR7OSLijeIDcmRxNmw2api+jEfxLoykJVice/E= golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= diff --git a/gateway/vendor/github.com/openfaas/faas-provider/types/model.go b/gateway/vendor/github.com/openfaas/faas-provider/types/model.go index 5a09e3d7..eb98cb19 100644 --- a/gateway/vendor/github.com/openfaas/faas-provider/types/model.go +++ b/gateway/vendor/github.com/openfaas/faas-provider/types/model.go @@ -1,5 +1,7 @@ package types +import "time" + // FunctionDeployment represents a request to create or update a Function. type FunctionDeployment struct { @@ -100,7 +102,9 @@ type FunctionStatus struct { // mount-point. ReadOnlyRootFilesystem bool `json:"readOnlyRootFilesystem,omitempty"` - // ** Status fields *8 + // ================ + // Fields for status + // ================ // InvocationCount count of invocations InvocationCount float64 `json:"invocationCount,omitempty"` @@ -111,4 +115,8 @@ type FunctionStatus struct { // AvailableReplicas is the count of replicas ready to receive // invocations as reported by the faas-provider AvailableReplicas uint64 `json:"availableReplicas,omitempty"` + + // CreatedAt is the time read back from the faas backend's + // data store for when the function or its container was created. + CreatedAt time.Time `json:"createdAt,omitempty"` } diff --git a/gateway/vendor/modules.txt b/gateway/vendor/modules.txt index fc42da6c..b354bd8a 100644 --- a/gateway/vendor/modules.txt +++ b/gateway/vendor/modules.txt @@ -37,7 +37,7 @@ github.com/nats-io/nuid ## explicit github.com/nats-io/stan.go github.com/nats-io/stan.go/pb -# github.com/openfaas/faas-provider v0.17.0 +# github.com/openfaas/faas-provider v0.17.3 ## explicit github.com/openfaas/faas-provider/auth github.com/openfaas/faas-provider/types