NATSResponse
This commit is contained in:
@@ -13,18 +13,29 @@ import (
|
|||||||
"github.com/rs/zerolog"
|
"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
|
// 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", "discovery", "workflow event", "peer discovery"}
|
||||||
"workflow event", "peer discovery"}
|
|
||||||
|
|
||||||
const (
|
const (
|
||||||
REMOVE_EXECUTION NATSMethod = iota
|
REMOVE_EXECUTION NATSMethod = iota
|
||||||
CREATE_EXECTUTION
|
CREATE_EXECTUTION
|
||||||
DISCOVERY
|
DISCOVERY
|
||||||
WORKFLOW_EVENT
|
WORKFLOW_EVENT
|
||||||
PEER_DISCOVERY
|
|
||||||
|
REMOVE_PEER
|
||||||
|
CREATE_PEER
|
||||||
|
|
||||||
|
CREATE_RESOURCE
|
||||||
|
REMOVE_RESOURCE
|
||||||
)
|
)
|
||||||
|
|
||||||
func (n NATSMethod) String() string {
|
func (n NATSMethod) String() string {
|
||||||
|
|||||||
Reference in New Issue
Block a user