-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
24 changed files
with
575 additions
and
206 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
[package] | ||
name = "qb-app-daemon" | ||
version.workspace = true | ||
edition.workspace = true | ||
|
||
[dependencies] | ||
tracing-subscriber = "0.3.18" | ||
tracing-panic = "0.1.2" | ||
tracing = "0.1.40" | ||
interprocess = { version = "2.2.0", features = ["tokio"], optional = true } | ||
tokio = { version = "1.37.0", features = [ | ||
"rt", | ||
"rt-multi-thread", | ||
"sync", | ||
"macros", | ||
] } | ||
clap = { version = "4.5.9", features = ["derive"] } | ||
qb-core = { path = "../qb-core" } | ||
qb-daemon = { path = "../qb-daemon" } | ||
qb-ext-local = { path = "../qb-ext-local" } | ||
qb-ext-tcp = { path = "../qb-ext-tcp", default-features = false } | ||
|
||
[features] | ||
default = ["ipc", "aws_lc_rs"] | ||
ipc = ["dep:interprocess"] | ||
aws_lc_rs = ["qb-ext-tcp/aws_lc_rs"] | ||
aws-lc-rs = ["aws_lc_rs"] | ||
ring = ["qb-ext-tcp/ring"] | ||
|
||
[[bin]] | ||
name = "qb-daemon" | ||
path = "src/main.rs" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
## qb-app-daemon | ||
|
||
This binary starts a daemon that manages a master | ||
and listens on a socket for a controlling task, which | ||
its instructions it then further processes, allowing | ||
the controlling task to manage the daemon over IPC. | ||
|
||
This binary is a daemon, meaning it should run somewhere | ||
in the background and only should be interacted by the user | ||
over other tools, which use the socket to control the daemon. | ||
|
||
### Running | ||
|
||
- Using `cargo run` (for development) | ||
```sh | ||
$ cargo run --bin qb-daemon -- <args> | ||
``` | ||
- Or [install qb-daemon locally](#installation) | ||
|
||
### Installation | ||
|
||
- Using `cargo install` | ||
```sh | ||
# In the project root directory | ||
$ cargo install --path qb-daemon | ||
# Make sure that ~/.cargo/bin is in $PATH | ||
$ qb-daemon <args> | ||
``` | ||
- Build manually | ||
```sh | ||
# In the project root directory | ||
$ cargo build --release --bin qb-daemon | ||
$ target/release/qb-daemon <args> | ||
``` | ||
|
||
### Commands | ||
|
||
See: `qb-daemon --help` | ||
``` | ||
$ qb-daemon --help | ||
Usage: qb-daemon [OPTIONS] | ||
Options: | ||
--ípc Bind to a socket for IPC [default] | ||
--no-ipc Do not bind to a socket for IPC | ||
--stdio Use STDIN/STDOUT for controlling (disables std logging) | ||
--no-stdio Do not use STDIN/STDOUT for controlling [default] | ||
-p, --path <PATH> The path, where the daemon stores its files [default: ./run/daemon1] | ||
-h, --help Print help | ||
-V, --version Print version | ||
``` | ||
|
||
You can use the LOG_LEVEL environment variable to specify which log level to use: | ||
|
||
command prefix|level description | ||
---|--- | ||
LOG_LEVEL=trace|Designates very low priority, often extremely verbose, information. | ||
LOG_LEVEL=debug|Designates lower priority information. | ||
LOG_LEVEL=info|Designates useful information. | ||
LOG_LEVEL=warn|Designates hazardous situations. | ||
LOG_LEVEL=error|Designates very serious errors. | ||
|
||
---- | ||
|
||
© 2024 The QuixByte Project Authors - All Rights Reserved |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
//! # qb-daemon | ||
//! | ||
//! This crate houses the daemon of the application, | ||
//! that is, the application that runs in the background, | ||
//! which handles interface tasks and their respective communication. | ||
//! | ||
//! We can communicate with the daemon using the [qb-control] messages. | ||
#![warn(missing_docs)] | ||
|
||
pub mod daemon; | ||
pub mod master; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
rust_input: crate::api | ||
rust_root: rust/ | ||
dart_output: lib/src/rust | ||
dart_output: lib/src/rust | ||
enable_lifetime: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.