Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 39 additions & 8 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 7 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ chrono = { workspace = true }
clap = { workspace = true, features = ["derive", "wrap_help"] }
tonic = { workspace = true }
prost = { workspace = true }
tokio = { workspace = true, features = ["macros", "rt-multi-thread"] }
tokio = { workspace = true, features = ["macros", "rt-multi-thread", "fs"] }
nix = { workspace = true, features = ["user", "hostname"] }
wasmtime = { workspace = true }
wasmtime-wasi = { workspace = true }
Expand Down Expand Up @@ -50,6 +50,9 @@ influxdb-line-protocol = { workspace = true }
psh-proto = { workspace = true }
mimalloc = { workspace = true }
nvml-wrapper = { workspace = true }
perf-event-rs = { workspace = true }
num_cpus = { workspace = true }
object = { workspace = true }

[lints]
workspace = true
Expand All @@ -58,7 +61,7 @@ workspace = true
host-op-perf = { path = "crates/op/host-op-perf" }
host-op-system = { path = "crates/op/host-op-system" }
psh-system = { path = "crates/psh-system" }
perf-event-rs = { git = "https://github.com/OptimatistOpenSource/perf-event-rs.git", rev = "423ca26f53b27193d2321028dae5fd362a9673e9" }
perf-event-rs = { git = "https://github.com/OptimatistOpenSource/perf-event-rs.git", rev = "d6881f34b8a9cde1d70dab5fb1415271e6b0bb25" }
tokio = "^1"
libc = "^0.2"
chrono = "^0.4"
Expand Down Expand Up @@ -87,9 +90,10 @@ local-ip-address = "^0.6"
TinyUFO = "0.4"
crossbeam = "0.8"
influxdb-line-protocol = "2"
psh-proto = { git = "https://github.com/OptimatistOpenSource/psh-proto.git", rev = "ca2919053029cb584b478611f8bf8496bf3cf7f7" }
psh-proto = { git = "https://github.com/OptimatistOpenSource/psh-proto.git", rev = "5cf7cc9" }
mimalloc = "0.1"
nvml-wrapper = "0.10.0"
object = "0.37"

[workspace.lints.rust]

Expand Down
3 changes: 3 additions & 0 deletions doc/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,6 @@ buf_watermark = 2048
enable = false
addr = "https://api.optimatist.com"
interval = 10

[perms]
allowed_paths = []
11 changes: 10 additions & 1 deletion src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@
// You should have received a copy of the GNU Lesser General Public License along with Performance Savior Home (PSH). If not,
// see <https://www.gnu.org/licenses/>.

use std::{fs, path::Path};
use std::{
fs,
path::{Path, PathBuf},
};

use anyhow::Result;
use serde::Deserialize;
Expand All @@ -24,6 +27,12 @@ const TEMPLATE: &str = include_str!("../doc/config.toml");
pub struct Config {
pub daemon: DaemonConfig,
pub remote: RemoteConfig,
pub perms: PermsConfig,
}

#[derive(Clone, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Deserialize)]
pub struct PermsConfig {
pub allowed_paths: Vec<PathBuf>,
}

#[derive(Clone, Deserialize)]
Expand Down
Loading
Loading