mirror of
https://github.com/postmannen/ctrl.git
synced 2025-03-05 14:56:49 +00:00
update doc with CTRL_FILE
This commit is contained in:
parent
4e6e4c515e
commit
636ed4855a
3 changed files with 26 additions and 1 deletions
|
@ -15,7 +15,8 @@
|
||||||
- [Request Methods](./core_request_methods.md)
|
- [Request Methods](./core_request_methods.md)
|
||||||
- [Nats timeouts](./core_nats_timeouts.md)
|
- [Nats timeouts](./core_nats_timeouts.md)
|
||||||
- [Startup folder](./core_startup_folder.md)
|
- [Startup folder](./core_startup_folder.md)
|
||||||
- [{{ctrl_DATA}} variable](./core_messaging_ctrl_DATA.md)
|
- [{{CTRL_DATA}} variable](./core_messaging_CTRL_DATA.md)
|
||||||
|
- [{{CTRL_FILE}}](./core_messaging_CTRL_FILE.md)
|
||||||
- [Errors](./core_errors.md)
|
- [Errors](./core_errors.md)
|
||||||
|
|
||||||
# Example standard messages
|
# Example standard messages
|
||||||
|
|
23
doc/src/core_messaging_CTRL_FILE.md
Normal file
23
doc/src/core_messaging_CTRL_FILE.md
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
# Message methodArgs variables
|
||||||
|
|
||||||
|
## {{CTRL_FILE}}
|
||||||
|
|
||||||
|
Read a local text file, and embed the content of the file into the methodArgs.
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
---
|
||||||
|
- toNodes:
|
||||||
|
- btdev1
|
||||||
|
#jetstreamToNode: btdev1
|
||||||
|
method: cliCommand
|
||||||
|
methodArgs:
|
||||||
|
- /bin/bash
|
||||||
|
- -c
|
||||||
|
- |
|
||||||
|
echo {{CTRL_FILE:/some_directory/source_file.yaml}}>/other_directory/destination_file.yaml
|
||||||
|
methodTimeout: 3
|
||||||
|
replyMethod: console
|
||||||
|
ACKTimeout: 0
|
||||||
|
```
|
||||||
|
|
||||||
|
The above example will before sending the message read the content of the file `/some_directory/source_file.yaml`. When the message is received at it's destination node and the cliCommand is executed the content will be written to `/other_directory/destination_file.yaml`.
|
1
doc/src/core_messaging_methodargs_variables.md
Normal file
1
doc/src/core_messaging_methodargs_variables.md
Normal file
|
@ -0,0 +1 @@
|
||||||
|
# Message methodArgs variables
|
Loading…
Add table
Reference in a new issue