adjust useless line
This commit is contained in:
@@ -17,7 +17,7 @@ import (
|
|||||||
type NATSMethod int
|
type NATSMethod int
|
||||||
|
|
||||||
var meths = []string{"remove execution", "create execution", "discovery",
|
var meths = []string{"remove execution", "create execution", "discovery",
|
||||||
"workflow event", "peer discovery", "peer detection"}
|
"workflow event", "peer discovery"}
|
||||||
|
|
||||||
const (
|
const (
|
||||||
REMOVE_EXECUTION NATSMethod = iota
|
REMOVE_EXECUTION NATSMethod = iota
|
||||||
@@ -25,7 +25,6 @@ const (
|
|||||||
DISCOVERY
|
DISCOVERY
|
||||||
WORKFLOW_EVENT
|
WORKFLOW_EVENT
|
||||||
PEER_DISCOVERY
|
PEER_DISCOVERY
|
||||||
PEER_DETECTION
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func (n NATSMethod) String() string {
|
func (n NATSMethod) String() string {
|
||||||
@@ -34,7 +33,7 @@ func (n NATSMethod) String() string {
|
|||||||
|
|
||||||
// NameToMethod returns the NATSMethod enum value from a string
|
// NameToMethod returns the NATSMethod enum value from a string
|
||||||
func NameToMethod(name string) NATSMethod {
|
func NameToMethod(name string) NATSMethod {
|
||||||
for _, v := range [...]NATSMethod{REMOVE_EXECUTION, CREATE_EXECTUTION, DISCOVERY, WORKFLOW_EVENT, PEER_DISCOVERY, PEER_DETECTION} {
|
for _, v := range [...]NATSMethod{REMOVE_EXECUTION, CREATE_EXECTUTION, DISCOVERY, WORKFLOW_EVENT, PEER_DISCOVERY} {
|
||||||
if strings.Contains(strings.ToLower(v.String()), strings.ToLower(name)) {
|
if strings.Contains(strings.ToLower(v.String()), strings.ToLower(name)) {
|
||||||
return v
|
return v
|
||||||
}
|
}
|
||||||
@@ -81,7 +80,7 @@ func (s *natsCaller) ListenNats(execs map[NATSMethod]func(map[string]string)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// SetNATSPub sets a message to the NATS server
|
// SetNATSPub sets a message to the NATS server
|
||||||
func (o *natsCaller) SetNATSPub(dataName string, method NATSMethod, data interface{}) string {
|
func (o *natsCaller) SetNATSPub(method NATSMethod, data interface{}) string {
|
||||||
if config.GetConfig().NATSUrl == "" {
|
if config.GetConfig().NATSUrl == "" {
|
||||||
return " -> NATS_SERVER is not set"
|
return " -> NATS_SERVER is not set"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user