mirror of
https://framagit.org/ppom/reaction
synced 2026-03-14 20:55:47 +01:00
src/client/request.rs rename and ARCHITECTURE.md update
This commit is contained in:
parent
6a778f3d01
commit
78056b6fc5
3 changed files with 18 additions and 14 deletions
|
|
@ -8,16 +8,16 @@ Here is a high-level overview of the codebase.
|
|||
|
||||
- `build.rs`: permits to create shell completions and man pages on build.
|
||||
- `Cargo.toml`, `Cargo.lock`: manifest and dependencies.
|
||||
- `config`: example / test configuration files. Look at its git history to discover more.
|
||||
- `config/`: example / test configuration files. Look at its git history to discover more.
|
||||
- `Makefile`: Makefile. Resumes useful commands.
|
||||
- `packaging`: Files useful for .deb and .tar generation.
|
||||
- `packaging/`: Files useful for .deb and .tar generation.
|
||||
- `release.py`: Build process for a release. Handles cross-compilation, .tar and .deb generation.
|
||||
|
||||
## Main source code
|
||||
|
||||
- `helpers_c`: C helpers. I wish to have special IP support in reaction and get rid of them. See #79 and #116.
|
||||
- `tests`: Integration tests. For now they test basic reaction runtime behavior, persistance, and client-daemon communication.
|
||||
- `src`: The source code, here we go!
|
||||
- `helpers_c/`: C helpers. I wish to have special IP support in reaction and get rid of them. See #79 and #116.
|
||||
- `tests/`: Integration tests. For now they test basic reaction runtime behavior, persistance, and client-daemon communication.
|
||||
- `src/`: The source code, here we go!
|
||||
|
||||
### Top-level files
|
||||
|
||||
|
|
@ -26,23 +26,24 @@ Here is a high-level overview of the codebase.
|
|||
- `src/cli.rs`: Command-line arguments
|
||||
- `src/tests.rs`: Test utilities
|
||||
|
||||
### `src/concepts`
|
||||
### `src/concepts/`
|
||||
|
||||
reaction really is about its configuration, which is at the center of the code.
|
||||
|
||||
There is one file for each of its concepts: configuration, streams, filters, actions, patterns.
|
||||
|
||||
### `src/protocol`
|
||||
### `src/protocol/`
|
||||
|
||||
Low-level serialization/deserialization and client-daemon protocol messages.
|
||||
|
||||
Shared by the client and daemon's socket. Also used by daemon's database.
|
||||
|
||||
### `src/client`
|
||||
### `src/client/`
|
||||
|
||||
Client code: `reaction show`, `reaction flush`, `reaction test-regex`.
|
||||
Client code: `reaction show`, `reaction flush`, `reaction trigger`, `reaction test-regex`.
|
||||
|
||||
- `show_flush.rs`: `show` & `flush` commands.
|
||||
- `request.rs`: commands requiring client/server communication: `show`, `flush` & `trigger`.
|
||||
- `test_config.rs`: `test-config` command.
|
||||
- `test_regex.rs`: `test-regex` command.
|
||||
|
||||
### `src/daemon`
|
||||
|
|
@ -53,15 +54,18 @@ This code has async code, to handle input streams and communication with clients
|
|||
|
||||
- `mod.rs`: daemon main function. Initializes all tasks, handles synchronization and quitting, etc.
|
||||
- `stream.rs`: Stream managers: start the stream `cmd` and dispatch its stdout lines to its Filter managers.
|
||||
- `filter.rs`: Filter managers: handle lines, persistance, store matches and trigger actions. This is the main piece of runtime logic.
|
||||
- `filter/`: Filter managers: handle lines, persistance, store matches and trigger actions. This is the main piece of runtime logic.
|
||||
- `mod.rs`: High-level logic
|
||||
- `state.rs`: Inner state operations
|
||||
- `socket.rs`: The socket task, responsible for communication with clients.
|
||||
- `shutdown.rs`: Logic for passing shutdown signal across all tasks
|
||||
|
||||
### `src/tree`
|
||||
|
||||
Persistence layer.
|
||||
|
||||
This is a database highly adapted to reaction workload, making reaction faster than when used with general purpose key-value databases
|
||||
(heed, sled and fjall crates ahve been tested).
|
||||
(heed, sled and fjall crates have been tested).
|
||||
Its design is explained in the comments of its files:
|
||||
|
||||
- `mod.rs`: main database code, with its two API structs: Tree and Database.
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
mod show_flush;
|
||||
mod request;
|
||||
mod test_config;
|
||||
mod test_regex;
|
||||
|
||||
pub use show_flush::request;
|
||||
pub use request::request;
|
||||
pub use test_config::test_config;
|
||||
pub use test_regex::test_regex;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue