SideCarCLI–Architecture and specs–part 2
Summary links SideCarCLI
( Description : SideCar for CLI applications. Interceptors for Line, Finish, Timer . See Code )The SideCarCLI application should start another application and intercept in various ways . What will execute when intercept is not known in advance – so should be read at runtime . So the SideCarCLI will load the interceptors and make then available to the application. Let’s say that , for the moment, the SideCarCLI will take all the configuration from the command line.
So let’s analyze the command line . The most simplest form it is:
SideCarCLI startApp –name YourCLIApplication
For intercepting the output or the error of the console we do not know in advance what we will use. So we will make start dynamically what applications will intercept the output lines provided by StartApp.
Also this is available for intercepting the result of the application and for the thing that is running periodically.
Also I want to provide a way for the users to make on-the-fly code to intercept – so I will make also a plugin architecture to provide interceptors on the fly.
Let’s see how the application command line will look –
————–
command path:
————–
SideCar for any other application
Usage: [command] [options]
Options:
-h|–help Show help information
-max|–maxSeconds max seconds for the StartApp to run
Commands:
_about
_listAllCommands
startApp
Run ‘ [command] -h|–help’ for more information about a command.
The most simplest form it is:
SideCarCLI startApp –name YourApp
————–
command path:–>_about
————–
Usage: _about [options]
Options:
-h|–help Show help information
————–
command path:–>startApp
————–
start the CLI application that you need to intercept
Usage: startApp [command] [options]
Options:
-n|–name <fullPathToApplication> Path to the StartApp
-a|–arguments <arguments_to_the_app> StartApp arguments
-f|–folder[:<folder_where_execute_the_app>] folder where to execute the StartApp – default folder of the StartApp
-h|–help Show help information
Commands:
finishInterceptors
lineInterceptors
plugins
timer
Run ‘startApp [command] -h|–help’ for more information about a command.
————–
command path:–>startApp–>lineInterceptors
————–
Specify application for start when StartApp has a new line output
Usage: startApp lineInterceptors [options]
Options:
-l|–list List interceptors for lines
-a|–add Add interceptor to execute
-f|–folder folder where to start the interceptor
-h|–help Show help information
————–
command path:–>startApp–>timer
————–
Specify timer to start an application at repeating interval
Usage: startApp timer [options]
Options:
-i|–intervalRepeatSeconds Repeat interval in seconds
-l|–list List interceptors to execute periodically
-a|–add Add interceptor to execute
-f|–folder folder where to start the interceptor
-h|–help Show help information
————–
command path:–>startApp–>finishInterceptors
————–
Specify interceptors for start when finish the app
Usage: startApp finishInterceptors [options]
Options:
-l|–list List interceptors for finish application
-a|–add Add interceptor to execute
-f|–folder folder where to start the interceptor
-h|–help Show help information
————–
command path:–>startApp–>plugins
————–
Load dynamically plugins
Usage: startApp plugins [options]
Options:
-f|–folder folder with plugins
-l|–list List plugins
-a|–add Add interceptor to execute
-h|–help Show help information
————–
command path:–>_listAllCommands
————–
List all commands for the app
Usage: _listAllCommands [options]
Options:
-h|–help Show help information
Leave a Reply