Skip to content

Commit b96bdfb

Browse files
committed
Update docs
1 parent d43ee61 commit b96bdfb

File tree

3 files changed

+33
-81
lines changed

3 files changed

+33
-81
lines changed

docs-src/commands.md

Lines changed: 12 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ using InEngine.Core;
5959

6060
namespace MyCommandPlugin
6161
{
62-
public class MyOptions : AbstractPlugin
62+
public class MyPlugin : AbstractPlugin
6363
{
6464
[VerbOption("my-command", HelpText="My example command.")]
6565
public MyCommand MyCommand { get; set; }
@@ -75,7 +75,7 @@ Add your plugin to the ["Plugins" list in appsettings.config](configuration) at
7575
Run your command:
7676

7777
```bash
78-
inengine.exe -pMyCommandPlugin my-command
78+
inengine.exe my-command
7979
```
8080

8181
### Writing Output
@@ -154,78 +154,30 @@ Arbitrary commands can be run, with an argument list by leveraging the InEngine.
154154
The command lists directory contents using "ls" with the "-lhp" switches:
155155

156156
```bash
157-
inengine.exe -pInEngine.Core proc -c"/bin/ls" -a"-lhp"
157+
inengine.exe proc -c"/bin/ls" -a"-lhp"
158158
```
159159

160-
## View Available Plugins
160+
## View Commands
161161

162-
Run inengine.exe without any arguments to see a list of plugins:
162+
Run inengine.exe with no arguments to see a list of commands:
163163

164-
```text
165-
___ _____ _ _ _ _____ _____
166-
|_ _|_ __ | ____|_ __ __ _(_)_ __ ___ | \ | | ____|_ _|
167-
| || '_ \| _| | '_ \ / _` | | '_ \ / _ \ | \| | _| | |
168-
| || | | | |___| | | | (_| | | | | | __/_| |\ | |___ | |
169-
|___|_| |_|_____|_| |_|\__, |_|_| |_|\___(_|_| \_|_____| |_|
170-
|___/
171-
172-
Usage:
173-
InEngine 3.x
174-
Copyright © 2017 Ethan Hann
175-
176-
p, plugin Plug-In to activate.
177-
178-
s, scheduler Run the scheduler.
179-
180-
c, configuration (Default: ./appsettings.json) The path to the
181-
configuration file.
182-
183-
184-
Plugins:
185-
InEngine.Core
164+
```bash
165+
inengine.exe
186166
```
187167

188-
## View Commands in a Plugin
168+
![InEngine Command List](/images/inengine.png)
189169

190-
Run inengine.exe with only the plugin specified:
191170

192-
```bash
193-
inengine.exe -pInEngine.Core
194-
```
171+
!!! note "InEngine.Core is a Plugin"
172+
The **InEngine.Core** library is itself a plugin that contains queueing, scheduling, and other commands.
195173

196-
The **InEngine.Core** library is itself a plugin that contains queue-related and other commands.
197-
As an example, this is the help output for the core plugin.
198-
199-
```text
200-
___ _____ _ _ _ _____ _____
201-
|_ _|_ __ | ____|_ __ __ _(_)_ __ ___ | \ | | ____|_ _|
202-
| || '_ \| _| | '_ \ / _` | | '_ \ / _ \ | \| | _| | |
203-
| || | | | |___| | | | (_| | | | | | __/_| |\ | |___ | |
204-
|___|_| |_|_____|_| |_|\__, |_|_| |_|\___(_|_| \_|_____| |_|
205-
|___/
206-
207-
Plugin:
208-
Name: InEngine.Core
209-
Version: 3.x
210-
211-
212-
Commands:
213-
queue:publish Publish a command message to a queue.
214-
queue:consume Consume one or more command messages from the queue.
215-
queue:length Get the number of messages in the primary and secondary queues.
216-
queue:flush Clear the primary or secondary queues.
217-
queue:republish Republish failed messages to the queue.
218-
queue:peek Peek at messages in the primary or secondary queues.
219-
echo Echo some text to the console. Useful for end-to-end testing.
220-
proc Launch an arbitrary process.
221-
```
222174

223-
## Print Help Text for a Plugin's Commands
175+
## View a Command's Help Text
224176

225177
Run the command with the -h or --help arguments.
226178

227179
```bash
228-
inengine.exe -pInEngine.Core queue:publish -h
180+
inengine.exe queue:publish -h
229181
```
230182

231183
The **InEngine.Core** plugin's command to clear the InEngine.NET queues produces this help message.

docs-src/index.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ Get started by pulling the binaries from the [latest release](https://github.com
1010
Then run a command the **echo** command from the core plugin:
1111

1212
```bash
13-
inengine.exe -pInEngine.Core echo --text"Hello, world"
13+
inengine.exe echo --text"Hello, world"
1414
```
1515
Or if you're a Linux or Mac OS X fan (like me!), use the **inengine** shell script ([Mono](http://www.mono-project.com/download/) is required):
1616

1717
```bash
18-
inengine -pInEngine.Core echo --text"Hello, world"
18+
inengine echo --text"Hello, world"
1919
```
2020

2121
Instead of downloading binaries and runtimes, you can pull the latest Docker image:
@@ -27,7 +27,7 @@ docker pull ethanhann/inengine:latest
2727
Now run a command in a container:
2828

2929
```bash
30-
docker run --rm inengine -pInEngine.Core echo --text"Hello, world"
30+
docker run --rm inengine echo --text"Hello, world"
3131
```
3232

3333
## How does queueing work?
@@ -39,15 +39,15 @@ Want to queue our example echo command to run in the background or possibly on a
3939
Use the core plugin's **queue:publish** command:
4040

4141
```bash
42-
inengine.exe -pInEngine.Core queue:publish --command-plugin=InEngine.Core --command-verb=echo --args "text=Hello, world"
42+
inengine.exe queue:publish --command-plugin=InEngine.Core --command-verb=echo --args "text=Hello, world"
4343
```
4444

4545
How do we consume that queued echo command?
4646

4747
Use the core plugin's **queue:consume** command of course:
4848

4949
```bash
50-
inengine.exe -pInEngine.Core queue:consume
50+
inengine.exe queue:consume
5151
```
5252

5353
## How do I run non-.NET commands?
@@ -63,5 +63,5 @@ print 'Hello, world!'
6363
Now execute it with the **proc** command:
6464

6565
```bash
66-
inengine -pInEngine.Core proc --command=/usr/bin/python --args=helloworld.py
66+
inengine proc --command=/usr/bin/python --args=helloworld.py
6767
```

docs-src/queuing.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -158,19 +158,19 @@ Note that all queue commands reside in the **InEngine.Core** plugin.
158158
This is an example of how to publish a command from the CLI by specifying the command's plugin, class name, and arguments:
159159

160160
```bash
161-
inengine.exe -pInEngine.Core queue:publish --command-plugin=MyCommandPlugin --command-class=MyCommand --args "text=bar"
161+
inengine.exe queue:publish --command-plugin=MyCommandPlugin --command-class=MyCommand --args "text=bar"
162162
```
163163

164164
There is an "Echo" command in the *InEngine.Core* package. It is useful for end-to-end testing with the queue feature.
165165

166166
```bash
167-
inengine.exe -pInEngine.Core queue:publish --command-plugin=InEngine.Core --command-class=InEngine.Core.Commands.Echo --args "text=foo"
167+
inengine.exe queue:publish --command-plugin=InEngine.Core --command-class=InEngine.Core.Commands.Echo --args "text=foo"
168168
```
169169

170170
The command verb can also be specified instead of the full class name:
171171

172172
```bash
173-
inengine.exe -pInEngine.Core queue:publish --command-plugin=InEngine.Core --command-verb=echo--args "text=foo"
173+
inengine.exe queue:publish --command-plugin=InEngine.Core --command-verb=echo--args "text=foo"
174174
```
175175

176176
## Consuming Commands
@@ -180,13 +180,13 @@ inengine.exe -pInEngine.Core queue:publish --command-plugin=InEngine.Core --comm
180180
Commands can be consumed from the command line with this simple command:
181181

182182
```bash
183-
inengine.exe -pInEngine.Core queue:consume
183+
inengine.exe queue:consume
184184
```
185185

186186
Use the **--secondary** argument to consume the secondary queue instead of the primary queue:
187187

188188
```bash
189-
inengine.exe -pInEngine.Core queue:consume --secondary
189+
inengine.exe queue:consume --secondary
190190
```
191191

192192
### With the Scheduler
@@ -219,40 +219,40 @@ new Consume {
219219
The **queue:length** command shows a quick summary of pending, in-progress, and failed commands in the primary and secondary queues:
220220

221221
```bash
222-
inengine.exe -pInEngine.Core queue:length
222+
inengine.exe queue:length
223223
```
224224

225225
### Peek at Queued Commands
226226

227227
The **queue:peek** command allows for queued commands to be inspected:
228228

229229
```bash
230-
inengine.exe -pInEngine.Core queue:peek --pending --in-progress --failed
230+
inengine.exe queue:peek --pending --in-progress --failed
231231
```
232232

233233
It is of course possible to peek in the secondary queues:
234234

235235
```bash
236-
inengine.exe -pInEngine.Core queue:peek --pending --secondary
236+
inengine.exe queue:peek --pending --secondary
237237
```
238238

239239
Queued commands can be viewed in JSON which maybe useful for debugging:
240240

241241
```bash
242-
inengine.exe -pInEngine.Core queue:peek --pending --json
242+
inengine.exe queue:peek --pending --json
243243
```
244244

245245
By default, up to the first 10 messages will be retrieved, but the range is configurable:
246246

247247
```bash
248-
inengine.exe -pInEngine.Core queue:peek --pending --to=100
248+
inengine.exe queue:peek --pending --to=100
249249
```
250250

251251
A slice of the queue can be retrieved using the from argument.
252252
For example, this queue:peek call retrieves the 100-200 queued commands:
253253

254254
```bash
255-
inengine.exe -pInEngine.Core queue:peek --pending --from=100 --to=200
255+
inengine.exe queue:peek --pending --from=100 --to=200
256256
```
257257

258258
## Re-queuing Failed Commands
@@ -261,20 +261,20 @@ Commands that throw an exception are put in a special "failed" queue.
261261
They can be republished with the **queue:republish** command:
262262

263263
```bash
264-
inengine.exe -pInEngine.Core queue:republish
264+
inengine.exe queue:republish
265265
```
266266

267267
Failed secondary queue commands can be republished as well:
268268

269269
```bash
270-
inengine.exe -pInEngine.Core queue:republish --secondary
270+
inengine.exe queue:republish --secondary
271271
```
272272

273273
By default, only 100 failed commands are republished at a time.
274274
The is configurable:
275275

276276
```bash
277-
inengine.exe -pInEngine.Core queue:republish --limit=1000
277+
inengine.exe queue:republish --limit=1000
278278
```
279279

280280
## Primary and Secondary Queue
@@ -289,7 +289,7 @@ If it is desirable, different [configuration files](configuration) can be used t
289289
Simply create a new config file with a new QueueName setting and point inengine.exe at it with the -c argument:
290290

291291
```bash
292-
inengine.exe -cMyCustomSettingsFile.json -pInEngine.Core queue:consume
292+
inengine.exe -cMyCustomSettingsFile.json queue:consume
293293
```
294294

295295
## Message Compression

0 commit comments

Comments
 (0)