From 9bbff0ad8411846106847bf40bdaef331841f54b Mon Sep 17 00:00:00 2001 From: postmannen Date: Thu, 15 Apr 2021 10:52:38 +0200 Subject: [PATCH] renamed message field replyTimeout to replyACKTimeout --- README.md | 20 +++++++++++-------- example/toShip1-REQCliCommand.json | 2 +- example/toShip2-REQOpCmdStart_REQHttpGet.json | 2 +- example/toShip2-REQOpCmdStop_REQHttpGet.json | 2 +- example/toShip2-REQOpPs.json | 2 +- message_and_subject.go | 2 +- subscriber_method_types.go | 2 +- 7 files changed, 18 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index e72dbee..6255d06 100644 --- a/README.md +++ b/README.md @@ -7,13 +7,17 @@ Command And Control anything like Servers, Containers, VM's or other by creating ```json [ { - "directory":"/var/steward/cli-command/executed-result", + "directory":"cli_command__result", + "fileExtension": ".result", "toNode": "ship1", - "data": ["bash","-c","sleep 3 & tree ./"], + "data": ["bash","-c","sleep 5 & tree ./"], "method":"REQCliCommand", - "ACKTimeout":10, + "replyMethod":"REQToFileAppend", + "ACKTimeout":5, "retries":3, - "methodTimeout": 4 + "replyACKTimeout":5, + "replyRetries":3, + "methodTimeout": 10 } ] ``` @@ -276,7 +280,7 @@ ACKTimeout // Normal Resend retries retries // The ACK timeout of the new message created via a request event. -replyTimeout +replyACKTimeout // The retries of the new message created via a request event. replyRetries // Timeout for long a process should be allowed to operate @@ -404,7 +408,7 @@ To send a Op Command message for process listing with custom timeout and amount }, "ACKTimeout":3, "retries":3, - "replyTimeout":3, + "replyACKTimeout":3, "replyRetries":3, "MethodTimeout": 7 } @@ -431,7 +435,7 @@ To send and Op Command to stop a subscriber on a node }, "ACKTimeout":3, "retries":3, - "replyTimeout":3, + "replyACKTimeout":3, "replyRetries":3, "MethodTimeout": 7 } @@ -457,7 +461,7 @@ To send and Op Command to start a subscriber on a node }, "ACKTimeout":3, "retries":3, - "replyTimeout":3, + "replyACKTimeout":3, "replyRetries":3, "MethodTimeout": 7 } diff --git a/example/toShip1-REQCliCommand.json b/example/toShip1-REQCliCommand.json index 77ff249..b03d539 100644 --- a/example/toShip1-REQCliCommand.json +++ b/example/toShip1-REQCliCommand.json @@ -8,7 +8,7 @@ "replyMethod":"REQToFileAppend", "ACKTimeout":5, "retries":3, - "replyTimeout":5, + "replyACKTimeout":5, "replyRetries":3, "methodTimeout": 10 } diff --git a/example/toShip2-REQOpCmdStart_REQHttpGet.json b/example/toShip2-REQOpCmdStart_REQHttpGet.json index 076d602..1d789ef 100644 --- a/example/toShip2-REQOpCmdStart_REQHttpGet.json +++ b/example/toShip2-REQOpCmdStart_REQHttpGet.json @@ -15,7 +15,7 @@ "replyMethod":"REQToFileAppend", "ACKTimeout":3, "retries":3, - "replyTimeout":3, + "replyACKTimeout":3, "replyRetries":3, "MethodTimeout": 7 } diff --git a/example/toShip2-REQOpCmdStop_REQHttpGet.json b/example/toShip2-REQOpCmdStop_REQHttpGet.json index 3efa2d1..13180cd 100644 --- a/example/toShip2-REQOpCmdStop_REQHttpGet.json +++ b/example/toShip2-REQOpCmdStop_REQHttpGet.json @@ -16,7 +16,7 @@ "replyMethod":"REQToFileAppend", "ACKTimeout":3, "retries":3, - "replyTimeout":3, + "replyACKTimeout":3, "replyRetries":3, "MethodTimeout": 7 } diff --git a/example/toShip2-REQOpPs.json b/example/toShip2-REQOpPs.json index 866b7af..fb2670d 100644 --- a/example/toShip2-REQOpPs.json +++ b/example/toShip2-REQOpPs.json @@ -11,7 +11,7 @@ "replyMethod":"REQToFileAppend", "ACKTimeout":3, "retries":3, - "replyTimeout":3, + "replyACKTimeout":3, "replyRetries":3, "MethodTimeout": 7 } diff --git a/message_and_subject.go b/message_and_subject.go index 5f55cf8..bc843aa 100644 --- a/message_and_subject.go +++ b/message_and_subject.go @@ -31,7 +31,7 @@ type Message struct { // Resend retries Retries int `json:"retries" yaml:"retries"` // The ACK timeout of the new message created via a request event. - ReplyTimeout int `json:"replyTimeout" yaml:"replyTimeout"` + ReplyACKTimeout int `json:"replyACKTimeout" yaml:"replyACKTimeout"` // The retries of the new message created via a request event. ReplyRetries int `json:"replyRetries" yaml:"replyRetries"` // Timeout for long a process should be allowed to operate diff --git a/subscriber_method_types.go b/subscriber_method_types.go index c7a1f8e..e793e11 100644 --- a/subscriber_method_types.go +++ b/subscriber_method_types.go @@ -408,7 +408,7 @@ func newReplyMessage(proc process, message Message, outData []byte) { ToNode: message.FromNode, Data: []string{string(outData)}, Method: message.ReplyMethod, - ACKTimeout: message.ReplyTimeout, + ACKTimeout: message.ReplyACKTimeout, Retries: message.ReplyRetries, // Put in a copy of the initial request message, so we can use it's properties if