{"id":33934856,"url":"https://github.com/roblox/rs-consul","last_synced_at":"2026-03-17T16:02:04.840Z","repository":{"id":37057425,"uuid":"375144565","full_name":"Roblox/rs-consul","owner":"Roblox","description":"This crate provides access to a set of strongly typed apis to interact with consul (https://www.consul.io/)","archived":false,"fork":false,"pushed_at":"2025-09-28T04:50:05.000Z","size":203,"stargazers_count":59,"open_issues_count":4,"forks_count":34,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-12-14T01:43:07.466Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Roblox.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-06-08T21:01:51.000Z","updated_at":"2025-12-09T14:00:22.000Z","dependencies_parsed_at":"2024-06-26T05:45:48.726Z","dependency_job_id":"735b085c-c4eb-4373-b753-3721f1c6a595","html_url":"https://github.com/Roblox/rs-consul","commit_stats":{"total_commits":94,"total_committers":15,"mean_commits":6.266666666666667,"dds":0.4787234042553191,"last_synced_commit":"664b5fa3e675cba6ad0dcde5bc72edca062217e9"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Roblox/rs-consul","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Roblox%2Frs-consul","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Roblox%2Frs-consul/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Roblox%2Frs-consul/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Roblox%2Frs-consul/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Roblox","download_url":"https://codeload.github.com/Roblox/rs-consul/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Roblox%2Frs-consul/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30626906,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-17T14:16:03.965Z","status":"ssl_error","status_checked_at":"2026-03-17T14:16:03.380Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2025-12-12T13:59:22.223Z","updated_at":"2026-03-17T16:02:04.834Z","avatar_url":"https://github.com/Roblox.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rs-consul\n\n[![Crates.io: rs-consul](https://img.shields.io/crates/v/rs-consul.svg)](https://crates.io/crates/rs-consul)\n[![Documentation](https://docs.rs/rs-consul/badge.svg)](https://docs.rs/rs-consul)\n[![Main](https://github.com/Roblox/rs-consul/actions/workflows/main.yml/badge.svg)](https://github.com/Roblox/rs-consul/actions/workflows/main.yml)\n\nThis crate provides access to a set of strongly typed apis to interact with\nconsul (\u003chttps://www.consul.io/\u003e)\n\n## Installation\n\nSimply include the rs-consul in your Cargo dependencies.\n\n```toml\n[dependencies]\nrs-consul = \"0.9.0\"\n```\n## Usage\nCheck [/examples](/examples) for more detailed usage\n### Initialize the client\n#### Environment Configuration (Recommended)\nThe client can be configured automatically using environment variables:\n```rust\nuse rs_consul::{types::*, Config, Consul};\n\nlet consul_config = Config::from_env();\nlet consul = Consul::new(consul_config);\n```\n#### Manual Configuration\nAlternatively, you can configure the client manually:\n```rust\nlet consul_config = Config {\n    address: \"http://localhost:8500\".to_string(), \n    token: None, // No token required in development mode\n    ..Default::default() // Uses default values for other settings\n};\n\nlet consul = Consul::new(consul_config);\n```\n### Register a Service\n```rust\n    let node_id = \"root-node\"; //node name\n    let service_name = \"new-service-1\"; //service name\n\n    let payload = RegisterEntityPayload {\n        ID: None,\n        Node: node_id.to_string(),\n        Address: \"127.0.0.1\".to_string(), //server address\n        Datacenter: None,\n        TaggedAddresses: Default::default(),\n        NodeMeta: Default::default(),\n        Service: Some(RegisterEntityService {\n            ID: None,\n            Service: service_name.to_string(),\n            Tags: vec![],\n            TaggedAddresses: Default::default(),\n            Meta: Default::default(),\n            Port: Some(42424), \n            Namespace: None,\n        }),\n        Check: None,\n        SkipNodeUpdate: None,\n    };\n\n    consul.register_entity(\u0026payload).await.unwrap();\n```\n### Deregister a service\n```rust\n    let node_id = \"root-node\";\n    let service_name = \"new-service-1\";\n\n    let payload = DeregisterEntityPayload {\n        Node: Some(node_id.to_string()),\n        Datacenter: None,\n        CheckID: None,\n        ServiceID: Some(service_name.to_string()),\n        Namespace: None,\n    };\n    consul.deregister_entity(\u0026payload).await.unwrap();\n```\n\n## Development\n\n```bash\ncargo build\n```\n\n### Tests\n\n#### Local Consul\n\nStart consul locally with a docker image.\n\n```bash\ndocker-compose up -d\n```\n\n#### CI Consul\n\nIn CI, we start a service container for the test.\n\n#### Running Tests\n\n```bash\ncargo test\n```\n\n## Contributions\n\nFor contributions, please:\n\n1. Make a pull request\n2. Make sure the tests pass\n3. Add a bullet to the Changelog\n\n## License\n\nrs-consul is available under the MIT license. See [LICENSE](LICENSE) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froblox%2Frs-consul","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Froblox%2Frs-consul","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froblox%2Frs-consul/lists"}