.. | ||
src | ||
Cargo.toml | ||
README.md |
Pipeline crate
What is inside ?
The pipeline crate is the biggest crate of the project. Where all the magic happens.
Getters
Contain getters for config, pipelines
Config
Without a config file pipeline can only read logs.
Getting a config file is nearly mandatory.
Internally Config::get()
will search for a config file
return it if founded,
- create git hooks if the file is at the root of a git directory.
- create log folders.
Cli crate
What is inside ?
Here lays everything related to the cli.
-
Commands definitions(
interface
directory) -
The actions to take on commands and options (
action.rs
) -
Autocompletion script generator (not mensionned in doc yet)
-
Special: Traits to convert the clap.rs cli Commands back to original strings.
-
Special: Process self forking strategy
Process self-fork to background
It involved some imagination in its inner design, for the Pipeplight executable to be align with the following requirements:
- keep runing in the background when terminal close;
- and remain a single executable to preserve types concistency.
This crate implements the most tricky part of Pipelight core.
When a command is launched pipelight run my_pipe
some things happened under the hood.
- The pipelight executable runs and check the command in the foreground.
- The executable duplicate itself to run a secondary executable in the backround.
- The foreground executable dies.
- The backround executable keeps running detached from terminal.