Migrate away from queue type in faas project

The queue type now resides in the provider, so that there is
no risk of a circular reference.

Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
This commit is contained in:
Alex Ellis (OpenFaaS Ltd)
2021-07-26 17:21:20 +01:00
committed by Alex Ellis
parent 06a51373e2
commit 58394bb1de
101 changed files with 10232 additions and 1763 deletions

View File

@ -8,7 +8,7 @@ import (
"time"
stan "github.com/nats-io/stan.go"
"github.com/openfaas/faas/gateway/queue"
ftypes "github.com/openfaas/faas-provider/types"
)
// NATSQueue queue for work
@ -32,7 +32,7 @@ type NATSQueue struct {
}
// Queue request for processing
func (q *NATSQueue) Queue(req *queue.Request) error {
func (q *NATSQueue) Queue(req *ftypes.QueueRequest) error {
fmt.Printf("NatsQueue - submitting request: %s.\n", req.Function)
out, err := json.Marshal(req)