mirror of
https://github.com/openfaas/faas.git
synced 2025-06-18 03:56:37 +00:00
Allow for customizing the name of the target NATS Streaming cluster.
Signed-off-by: Bruno Miguel Custódio <brunomcustodio@gmail.com>
This commit is contained in:
committed by
Alex Ellis
parent
ff5ec39e4d
commit
365f459b3f
5
gateway/vendor/github.com/openfaas/nats-queue-worker/handler/handler.go
generated
vendored
5
gateway/vendor/github.com/openfaas/nats-queue-worker/handler/handler.go
generated
vendored
@ -7,17 +7,16 @@ import (
|
||||
)
|
||||
|
||||
// CreateNATSQueue ready for asynchronous processing
|
||||
func CreateNATSQueue(address string, port int, clientConfig NATSConfig) (*NATSQueue, error) {
|
||||
func CreateNATSQueue(address string, port int, clusterName string, clientConfig NATSConfig) (*NATSQueue, error) {
|
||||
var err error
|
||||
natsURL := fmt.Sprintf("nats://%s:%d", address, port)
|
||||
log.Printf("Opening connection to %s\n", natsURL)
|
||||
|
||||
clientID := clientConfig.GetClientID()
|
||||
clusterID := "faas-cluster"
|
||||
|
||||
queue1 := NATSQueue{
|
||||
ClientID: clientID,
|
||||
ClusterID: clusterID,
|
||||
ClusterID: clusterName,
|
||||
NATSURL: natsURL,
|
||||
Topic: "faas-request",
|
||||
maxReconnect: clientConfig.GetMaxReconnect(),
|
||||
|
Reference in New Issue
Block a user