NATSResponse

This commit is contained in:
mr
2026-01-28 15:05:48 +01:00
parent 3c052bf165
commit ecb734187a

View File

@@ -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 {