{"id":16949496,"url":"https://github.com/tailhook/ns-env-config","last_synced_at":"2025-03-21T10:15:09.444Z","repository":{"id":57646108,"uuid":"113113984","full_name":"tailhook/ns-env-config","owner":"tailhook","description":"An env_logger-inspired one-stop configuration for name resolution based on abstract-ns.","archived":false,"fork":false,"pushed_at":"2017-12-05T01:33:59.000Z","size":12,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-28T04:48:30.025Z","etag":null,"topics":["abstract-ns","dns","name-resolution","rust","service-discovery"],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tailhook.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-12-05T01:08:22.000Z","updated_at":"2017-12-05T01:32:48.000Z","dependencies_parsed_at":"2022-08-27T20:02:07.384Z","dependency_job_id":null,"html_url":"https://github.com/tailhook/ns-env-config","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tailhook%2Fns-env-config","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tailhook%2Fns-env-config/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tailhook%2Fns-env-config/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tailhook%2Fns-env-config/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tailhook","download_url":"https://codeload.github.com/tailhook/ns-env-config/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244776353,"owners_count":20508507,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["abstract-ns","dns","name-resolution","rust","service-discovery"],"created_at":"2024-10-13T21:55:02.038Z","updated_at":"2025-03-21T10:15:09.423Z","avatar_url":"https://github.com/tailhook.png","language":"Rust","readme":"NS Env Config\n=============\n\n[API Docs](https://docs.rs/ns-env-config) |\n[Usage](https://github.com/tailhook/ns-env-config#usage) |\n[Github](https://github.com/tailhook/ns-env-config) |\n[Crate](https://crates.io/crates/ns-env-config)\n\nAn env_logger-inspired one-stop configuration for name resolution based\non [`abstract-ns`](https://crates.io/crates/abstract-ns).\n\n**Goals:**\n\n1. Make bootstrapping of small to medium size apps easier\n2. Provide a standard way for configuring name resolution in rust ecosystem\n\n**Features:**\n\n1. Standard libc-based name resolution by default (using threads)\n2. [TODO] Feature-gated other resolvers (async, consul,...)\n3. If compiled in, resolvers are enabled by `RUST_NS=resolver_name`\n4. Sane defaults for resolvers\n5. Subscriptions are enabled by default (using polling if not available)\n6. Some options configured from env (`RUST_NS=resolver_name:option=value`)\n7. [TODO] Suffix-based resolution (`RUST_NS=std,consul=consul-resolver`)\n\n**Non-goals:**\n\n1. Covering every other way to resolve names\n2. Covering all the settings of every resolvers\n\n\nUsage\n=====\n\nStandard Resolver\n-----------------\n\n```shell\n$ RUST_NS=std ./your-app\n```\n\nSince standard library resolver is not asynchronous we run resolver\nin a thread pool.\n\nParameters:\n\n* `poll_ivl` -- polling interval for subscriptions in seconds, default `1`\n* `threads` -- number of threads for name resolution, default `4`\n\nBiggest declaration is something like this:\n\n```shell\n$ RUST_NS=std:poll_ivl=10:threads=16 ./your-app\n```\n\n\nLicense\n=======\n\nLicensed under either of\n\n* Apache License, Version 2.0,\n  (./LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)\n* MIT license (./LICENSE-MIT or http://opensource.org/licenses/MIT)\n  at your option.\n\nContribution\n------------\n\nUnless you explicitly state otherwise, any contribution intentionally\nsubmitted for inclusion in the work by you, as defined in the Apache-2.0\nlicense, shall be dual licensed as above, without any additional terms or\nconditions.\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftailhook%2Fns-env-config","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftailhook%2Fns-env-config","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftailhook%2Fns-env-config/lists"}