-
Client: Cli tool to contact the background service
-
Foldend: Background server service.
Stores configuration and mapping of handlers.
Foldend instantiates pipeline handler threads and is responsible for their lifetime.
- Pipeline handler: File watching handler responsible for executing pipeline logic on it's directory.
-
Read configuration
-
Startup registered handlers configured to start alongside service startup.
-
Listen for client requests
-
Start file watcher thread on directory.
-
(Optional based on configuration) Apply pipeline on all files in directory.
-
Read file watcher events to decide on if to execute pipeline.
-
Pipeline execution -
Each action
is applied sequentially, and is required to succeed,
To advance to the next action
. Otherwise ending the pipeline for the current event.
File watching events are handled sequentially as well to not apply pipeline on same file.
Pipeline handler
- A thread designated to file watching a specific directory.
Can also refer to the configuration of the handler.
Event
- Ruleset on what file watching events to apply pipeline on.Action
- Common logic applied as a stage in a pipeline.Input
- References file paths relevant to a single pipeline:-
EventFilePath
- File path of the original file the event was referring to. -
ActionFilePath
- File path of the previous file that an action digested.Some
actions
create / move the file after working with the original file;This field's value will change at the end of every
action
as part of the pipeline.Can't be used on the first action in a pipeline.
-
- Input file path formatting on specific action fields using the keyword -
$input$
. - Datetime formatting on specific action fields using strftime conventions.