NATSResponse
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user