mirror of
https://github.com/postmannen/ctrl.git
synced 2024-12-14 12:37:31 +00:00
Set event types to correct type
This commit is contained in:
parent
7dcb9e5709
commit
dc209d7ad3
2 changed files with 8 additions and 4 deletions
|
@ -120,7 +120,7 @@ func (s *server) ProcessesStart() {
|
|||
if s.configuration.StartSubCLICommandRequest.OK {
|
||||
{
|
||||
fmt.Printf("Starting CLICommand Request subscriber: %#v\n", s.nodeName)
|
||||
sub := newSubject(CLICommandRequest, EventACK, s.nodeName)
|
||||
sub := newSubject(CLICommandRequest, CommandACK, s.nodeName)
|
||||
proc := newProcess(s.processes, s.toRingbufferCh, s.configuration, sub, s.errorKernel.errorCh, processKindSubscriber, s.configuration.StartSubCLICommandRequest.Values, nil)
|
||||
go proc.spawnWorker(s)
|
||||
}
|
||||
|
@ -130,7 +130,7 @@ func (s *server) ProcessesStart() {
|
|||
if s.configuration.StartSubCLICommandRequestNOSEQ.OK {
|
||||
{
|
||||
fmt.Printf("Starting CLICommand NOSEQ Request subscriber: %#v\n", s.nodeName)
|
||||
sub := newSubject(CLICommandRequestNOSEQ, EventACK, s.nodeName)
|
||||
sub := newSubject(CLICommandRequestNOSEQ, CommandACK, s.nodeName)
|
||||
proc := newProcess(s.processes, s.toRingbufferCh, s.configuration, sub, s.errorKernel.errorCh, processKindSubscriber, s.configuration.StartSubCLICommandRequestNOSEQ.Values, nil)
|
||||
go proc.spawnWorker(s)
|
||||
}
|
||||
|
|
|
@ -116,6 +116,9 @@ const (
|
|||
// - EventACK
|
||||
// - EventNack
|
||||
func (m Method) GetMethodsAvailable() MethodsAvailable {
|
||||
|
||||
// Command, Used to make a request to perform an action
|
||||
// Event, Used to communicate that an action has been performed.
|
||||
ma := MethodsAvailable{
|
||||
methodhandlers: map[Method]methodHandler{
|
||||
OpCommand: methodOpCommand{
|
||||
|
@ -128,10 +131,10 @@ func (m Method) GetMethodsAvailable() MethodsAvailable {
|
|||
commandOrEvent: CommandACK,
|
||||
},
|
||||
CLICommandRequest: methodCLICommandRequest{
|
||||
commandOrEvent: EventACK,
|
||||
commandOrEvent: CommandACK,
|
||||
},
|
||||
CLICommandRequestNOSEQ: methodCLICommandRequestNOSEQ{
|
||||
commandOrEvent: EventACK,
|
||||
commandOrEvent: CommandACK,
|
||||
},
|
||||
CLICommandReply: methodCLICommandReply{
|
||||
commandOrEvent: EventACK,
|
||||
|
@ -250,6 +253,7 @@ func (m methodOpCommandRequest) handler(proc process, message Message, node stri
|
|||
out := []byte{}
|
||||
|
||||
switch {
|
||||
|
||||
case message.Data[0] == "ps":
|
||||
proc.processes.mu.Lock()
|
||||
// Loop the the processes map, and find all that is active to
|
||||
|
|
Loading…
Reference in a new issue