mirror of
https://github.com/openfaas/faas.git
synced 2025-06-22 06:43:23 +00:00
Migrate to Go 1.18 and update dependencies
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alex@openfaas.com>
This commit is contained in:
committed by
Alex Ellis
parent
2e14a34243
commit
b87b96ae45
8
gateway/vendor/github.com/openfaas/faas-provider/types/function_status.go
generated
vendored
8
gateway/vendor/github.com/openfaas/faas-provider/types/function_status.go
generated
vendored
@ -63,19 +63,19 @@ type FunctionStatus struct {
|
||||
// data store for when the function or its container was created.
|
||||
CreatedAt time.Time `json:"createdAt,omitempty"`
|
||||
|
||||
// Utilisation represents CPU and RAM used by all of the
|
||||
// Usage represents CPU and RAM used by all of the
|
||||
// functions' replicas. Divide by AvailableReplicas for an
|
||||
// average value per replica.
|
||||
Utilisation FunctionUtilisation `json:"usage,omitempty"`
|
||||
Usage *FunctionUsage `json:"usage,omitempty"`
|
||||
}
|
||||
|
||||
// FunctionUtilisation represents CPU and RAM used by all of the
|
||||
// FunctionUsage represents CPU and RAM used by all of the
|
||||
// functions' replicas.
|
||||
//
|
||||
// CPU is measured in seconds consumed since the last measurement
|
||||
// RAM is measured in total bytes consumed
|
||||
//
|
||||
type FunctionUtilisation struct {
|
||||
type FunctionUsage struct {
|
||||
// CPU is the increase in CPU usage since the last measurement
|
||||
// equivalent to Kubernetes' concept of millicores.
|
||||
CPU float64 `json:"cpu,omitempty"`
|
||||
|
9
gateway/vendor/github.com/openfaas/nats-queue-worker/handler/nats_queue.go
generated
vendored
9
gateway/vendor/github.com/openfaas/nats-queue-worker/handler/nats_queue.go
generated
vendored
@ -2,7 +2,6 @@ package handler
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"log"
|
||||
"sync"
|
||||
"time"
|
||||
@ -33,7 +32,13 @@ type NATSQueue struct {
|
||||
|
||||
// Queue request for processing
|
||||
func (q *NATSQueue) Queue(req *ftypes.QueueRequest) error {
|
||||
fmt.Printf("NatsQueue - submitting request: %s.\n", req.Function)
|
||||
callId := ""
|
||||
|
||||
if v := req.Header.Get("X-Call-Id"); len(v) > 0 {
|
||||
callId = v
|
||||
}
|
||||
|
||||
log.Printf("[%s] Queueing (%d) bytes for: %s.\n", callId, len(req.Body), req.Function)
|
||||
|
||||
out, err := json.Marshal(req)
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user