Skip to content

Commit ed24020

Browse files
committed
chore(file-system-monitor): rename elf check configuration
1 parent cece664 commit ed24020

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

crates/modules/file-system-monitor/README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,23 +17,23 @@ in its first bytes.
1717

1818
|Config|Type|Description|
1919
|------|----|-----------|
20-
|`elf_check_enabled`|boolean|Enable ELF check|
20+
|`elf_check`|boolean|Enable ELF check|
2121
|`elf_check_whitelist`|path list|Paths ignored by ELF check|
2222

2323
Default configuration:
2424

2525
```ini
2626
[file-system-monitor]
2727
enabled=true
28-
elf_check_enabled=true
28+
elf_check=true
2929
elf_check_whitelist=/proc,/sys,/dev
3030
```
3131

3232
You disable this module or the ELF check with:
3333

3434
```sh
3535
pulsar config --set file-system-monitor.enabled=false
36-
pulsar config --set file-system-monitor.elf_check_enabled=false
36+
pulsar config --set file-system-monitor.elf_check=false
3737
```
3838

3939
## Testing

crates/modules/file-system-monitor/src/lib.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ pub mod pulsar {
114114
_state: &mut Self::State,
115115
ctx: &ModuleContext,
116116
) -> Result<(), ModuleError> {
117-
if config.elf_check_enabled {
117+
if config.elf_check {
118118
check_elf(ctx, &config.elf_check_whitelist, event).await;
119119
}
120120
Ok(())
@@ -171,7 +171,7 @@ pub mod pulsar {
171171

172172
#[derive(Clone, Debug, Default)]
173173
pub struct Config {
174-
elf_check_enabled: bool,
174+
elf_check: bool,
175175
elf_check_whitelist: Vec<String>,
176176
}
177177

@@ -180,7 +180,7 @@ pub mod pulsar {
180180

181181
fn try_from(config: &ModuleConfig) -> Result<Self, Self::Error> {
182182
Ok(Config {
183-
elf_check_enabled: config.with_default("elf_check_enabled", true)?,
183+
elf_check: config.with_default("elf_check", true)?,
184184
elf_check_whitelist: config.get_list_with_default(
185185
"elf_check_whitelist",
186186
vec![

0 commit comments

Comments
 (0)