execution pllaner

This commit is contained in:
mr
2026-03-11 08:25:18 +01:00
parent e03a0d3dd0
commit 933b7147e9

View File

@@ -25,14 +25,15 @@ type NATSResponse struct {
// NATS Method Enum defines the different methods that can be used to interact with the NATS server
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",
"propalgation event", "search event",
}
const (
REMOVE_EXECUTION NATSMethod = iota
CREATE_EXECTUTION
CREATE_EXECUTION
PLANNER_EXECUTION
DISCOVERY
WORKFLOW_EVENT
@@ -51,7 +52,7 @@ func (n NATSMethod) String() string {
// NameToMethod returns the NATSMethod enum value from a string
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} {
if strings.Contains(strings.ToLower(v.String()), strings.ToLower(name)) {
return v