Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: zenohd --cfg #1263

Merged
merged 3 commits into from
Jul 25, 2024
Merged
Show file tree
Hide file tree
Changes from 2 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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ See other examples of Zenoh usage in [examples/](examples)

* `--adminspace-permissions <[r|w|rw|none]>`: Configure the read and/or write permissions on the admin space. Default is read only.
* `-c, --config <FILE>`: a [JSON5](https://json5.org) configuration file. [DEFAULT_CONFIG.json5](DEFAULT_CONFIG.json5) shows the schema of this file. All properties of this configuration are optional, so you may not need such a large configuration for your use-case.
* `--cfg <KEY>:<VALUE>`: allows you to change specific parts of the configuration right after it has been constructed. VALUE must be a valid JSON5 value, and key must be a path through the configuration file, where each element is separated by a `/`. When inserting in parts of the config that are arrays, you may use indexes, or may use `+` to indicate that you want to append your value to the array. `--cfg` passed values will always override any previously existing value for their key in the configuration.
* `--cfg [<KEY>:<VALUE>]...`: allows you to change specific parts of the configuration right after it has been constructed. VALUE must be a valid JSON5 value, and key must be a path through the configuration file, where each element is separated by a `/`. When inserting in parts of the config that are arrays, you may use indexes, or may use `+` to indicate that you want to append your value to the array. `--cfg` passed values will always override any previously existing value for their key in the configuration.
* `-l, --listen <ENDPOINT>...`: An endpoint on which this router will listen for incoming sessions.
Repeat this option to open several listeners. By default, `tcp/[::]:7447` is used. The following endpoints are currently supported:
- TCP: `tcp/<host_name_or_IPv4_or_IPv6>:<port>`
Expand Down
2 changes: 2 additions & 0 deletions zenohd/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,8 @@ fn config_from_args(args: &Args) -> Config {
}
Err(e) => tracing::warn!("Couldn't perform configuration {}: {}", json, e),
}
} else {
panic!("{} given by --cfg is not a valid KEY:VALUE pair", json)
Mallets marked this conversation as resolved.
Show resolved Hide resolved
}
}
tracing::debug!("Config: {:?}", &config);
Expand Down