execution pllaner
This commit is contained in:
@@ -25,14 +25,15 @@ type NATSResponse struct {
|
|||||||
// NATS Method Enum defines the different methods that can be used to interact with the NATS server
|
// NATS Method Enum defines the different methods that can be used to interact with the NATS server
|
||||||
type NATSMethod int
|
type NATSMethod int
|
||||||
|
|
||||||
var meths = []string{"remove execution", "create execution", "discovery",
|
var meths = []string{"remove execution", "create execution", "planner execution", "discovery",
|
||||||
"workflow event", "argo kube event", "create resource", "remove resource",
|
"workflow event", "argo kube event", "create resource", "remove resource",
|
||||||
"propalgation event", "search event",
|
"propalgation event", "search event",
|
||||||
}
|
}
|
||||||
|
|
||||||
const (
|
const (
|
||||||
REMOVE_EXECUTION NATSMethod = iota
|
REMOVE_EXECUTION NATSMethod = iota
|
||||||
CREATE_EXECTUTION
|
CREATE_EXECUTION
|
||||||
|
PLANNER_EXECUTION
|
||||||
DISCOVERY
|
DISCOVERY
|
||||||
|
|
||||||
WORKFLOW_EVENT
|
WORKFLOW_EVENT
|
||||||
@@ -51,7 +52,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, ARGO_KUBE_EVENT,
|
for _, v := range [...]NATSMethod{REMOVE_EXECUTION, CREATE_EXECUTION, PLANNER_EXECUTION, DISCOVERY, WORKFLOW_EVENT, ARGO_KUBE_EVENT,
|
||||||
CREATE_RESOURCE, REMOVE_RESOURCE, PROPALGATION_EVENT, SEARCH_EVENT} {
|
CREATE_RESOURCE, REMOVE_RESOURCE, PROPALGATION_EVENT, SEARCH_EVENT} {
|
||||||
if strings.Contains(strings.ToLower(v.String()), strings.ToLower(name)) {
|
if strings.Contains(strings.ToLower(v.String()), strings.ToLower(name)) {
|
||||||
return v
|
return v
|
||||||
|
|||||||
Reference in New Issue
Block a user