Crates.io | ns-env-config |
lib.rs | ns-env-config |
version | 0.1.0 |
source | src |
created_at | 2017-12-05 01:25:45.202831 |
updated_at | 2017-12-05 01:25:45.202831 |
description | An env_logger-inspired one-stop configuration for name resolution based on abstract-ns. Reduces boilerplate and provides standard way to configure DNS for applications via `RUST_NS` environment variable. |
homepage | https://github.com/tailhook/ns-env-config |
repository | |
max_upload_size | |
id | 41759 |
size | 28,025 |
API Docs | Usage | Github | Crate
An env_logger-inspired one-stop configuration for name resolution based on abstract-ns.
Goals:
Features:
RUST_NS=resolver_name
RUST_NS=resolver_name:option=value
)RUST_NS=std,consul=consul-resolver
)Non-goals:
Covering every other way to resolve names
Covering all the settings of every resolvers
$ RUST_NS=std ./your-app
Since standard library resolver is not asynchronous we run resolver in a thread pool.
Parameters:
poll_ivl
-- polling interval for subscriptions in seconds, default 1
threads
-- number of threads for name resolution, default 4
Biggest declaration is something like this:
$ RUST_NS=std:poll_ivl=10:threads=16 ./your-app
Licensed under either of
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.