diff --git a/tools/nats_caller.go b/tools/nats_caller.go index 74f31f4..57cd2a4 100644 --- a/tools/nats_caller.go +++ b/tools/nats_caller.go @@ -13,18 +13,29 @@ import ( "github.com/rs/zerolog" ) +type NATSResponse struct { + FromApp string `json:"from_app"` + Datatype DataType `json:"datatype"` + Method int `json:"method"` + Payload []byte `json:"payload"` +} + // 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", - "workflow event", "peer discovery"} +var meths = []string{"remove execution", "create execution", "discovery", "workflow event", "peer discovery"} const ( REMOVE_EXECUTION NATSMethod = iota CREATE_EXECTUTION DISCOVERY WORKFLOW_EVENT - PEER_DISCOVERY + + REMOVE_PEER + CREATE_PEER + + CREATE_RESOURCE + REMOVE_RESOURCE ) func (n NATSMethod) String() string {