{"id":37224343,"url":"https://github.com/agilira/argus-provider-consul","last_synced_at":"2026-01-15T01:41:10.544Z","repository":{"id":317666934,"uuid":"1063216094","full_name":"agilira/argus-provider-consul","owner":"agilira","description":"Official Argus provider for remote configuration management through HashiCorp Consul. It enables real-time configuration loading and watching from Consul KV store with native blocking queries, multi-datacenter support, and production-ready security features.","archived":false,"fork":false,"pushed_at":"2025-10-27T09:18:14.000Z","size":167,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-31T00:55:15.025Z","etag":null,"topics":["acl","agilira-argus","argus","go","hashicorp-consul","health-check","provider","tls"],"latest_commit_sha":null,"homepage":"https://github.com/agilira/argus-provider-consul","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/agilira.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","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":"2025-09-24T10:20:53.000Z","updated_at":"2025-10-20T11:23:58.000Z","dependencies_parsed_at":"2025-10-02T10:21:33.816Z","dependency_job_id":"c5def1db-cc59-4acd-bb67-647f9443a219","html_url":"https://github.com/agilira/argus-provider-consul","commit_stats":null,"previous_names":["agilira/argus-provider-consul"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/agilira/argus-provider-consul","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agilira%2Fargus-provider-consul","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agilira%2Fargus-provider-consul/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agilira%2Fargus-provider-consul/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agilira%2Fargus-provider-consul/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/agilira","download_url":"https://codeload.github.com/agilira/argus-provider-consul/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agilira%2Fargus-provider-consul/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28441031,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-15T00:55:22.719Z","status":"ssl_error","status_checked_at":"2026-01-15T00:55:20.945Z","response_time":107,"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":["acl","agilira-argus","argus","go","hashicorp-consul","health-check","provider","tls"],"created_at":"2026-01-15T01:41:09.722Z","updated_at":"2026-01-15T01:41:10.535Z","avatar_url":"https://github.com/agilira.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# argus-provider-consul: Argus remote provider for HashiCorp Consul\n### an AGILira library\n\nOfficial [Argus](https://github.com/agilira/argus) provider for remote configuration management through [HashiCorp Consul](https://github.com/hashicorp/consul).\nIt enables real-time configuration loading and watching from Consul KV store with native blocking queries, multi-datacenter support, and production-ready security features.\n\n[![CI](https://github.com/agilira/argus-provider-consul/actions/workflows/ci.yml/badge.svg)](https://github.com/agilira/argus-provider-consul/actions/workflows/ci.yml)\n[![CodeQL](https://github.com/agilira/argus-provider-consul/actions/workflows/codeql.yml/badge.svg)](https://github.com/agilira/argus-provider-consul/actions/workflows/codeql.yml)\n[![Security](https://img.shields.io/badge/Security-gosec-brightgreen)](https://github.com/agilira/argus-provider-consul/actions/workflows/ci.yml)\n[![Go Report Card](https://img.shields.io/badge/go_report-A+-brightgreen)](https://goreportcard.com/report/github.com/agilira/argus-provider-consul)\n[![Made For Argus](https://img.shields.io/badge/Made_for-Argus-AFEEEE)](https://github.com/agilira/argus)\n\n**[Features](#features) • [Installation](#installation) • [Quick Start](#quick-start) • [Configuration](#configuration) • [Demo](#demo) • [Requirements](#requirements)**\n\n## Features\n\n- **Real-time Native Watch**: Leverages Consul blocking queries for instant updates with minimal overhead.\n- **Multi-Datacenter Support**: Specify the desired datacenter directly in the configuration URL.\n- **ACL Token Authentication**: Secure integration with protected Consul environments.\n- **TLS Connections**: Support for encrypted communication with the Consul cluster.\n- **Secure by Design**: Red-team tested against path traversal, SSRF, resource exhaustion \u0026 TLS bypass attacks.\n- **Resource Protection**: Built-in limits for concurrent connections, memory usage, and goroutine management.\n- **Integrated Health Check**: Verifies connectivity and Consul cluster status.\n\n## Compatibility and Support\n\nargus-provider-consul is designed to work with Consul 1.32+ and follows Long-Term Support guidelines to ensure consistent performance across production deployments.\n\n## Installation\n\n```bash\n\ngo get github.com/agilira/argus-provider-consul\n\n```\n\n## Quick Start\n\nTo use the provider, import it and register it with Argus:\n\n```go\npackage main\n\nimport (\n    \"context\"\n    \"log\"\n    \"time\"\n\n    \"github.com/agilira/argus\" // Argus core\n    consul \"github.com/agilira/argus-provider-consul\" // Consul provider\n)\n\nfunc main() {\n    // Register the Consul provider\n    consulProvider, err := consul.GetProvider()\n    if err != nil {\n        log.Fatal(\"Failed to create Consul provider:\", err)\n    }\n    \n    if err := argus.RegisterRemoteProvider(\"consul\", consulProvider); err != nil {\n        log.Fatal(\"Failed to register Consul provider:\", err)\n    }\n\n    consulURL := \"consul://localhost:8500/config/myapp\"\n\n    // --- Single Load ---\n    log.Println(\"Loading configuration from Consul...\")\n    config, err := argus.LoadRemoteConfig(consulURL)\n    if err != nil {\n        log.Fatalf(\"Configuration loading error: %v\", err)\n    }\n    log.Printf(\"Configuration loaded: %+v\\n\", config)\n\n\n    // --- Real-time Monitoring ---\n    log.Println(\"\\nStarting real-time monitoring (watch)...\")\n    ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)\n    defer cancel()\n\n    configChan, err := argus.WatchRemoteConfigWithContext(ctx, consulURL)\n    if err != nil {\n        log.Fatalf(\"Watch startup error: %v\", err)\n    }\n\n    // Goroutine to handle updates\n    go func() {\n        for newConfig := range configChan {\n            log.Printf(\"Configuration update received: %+v\\n\", newConfig)\n            // Apply new configuration to your application here\n        }\n        log.Println(\"Watch channel closed.\")\n    }()\n\n    // Keep application running to receive updates\n    \u003c-ctx.Done()\n}\n\n```\n\n## Configuration\n\n### URL Format\n\nThe provider is configured through a specific URL:\n\n```\nconsul://[user:pass@]host:port/key/path[?query_params]\n```\n\n**Components:**\n\n- **host:port**: Your Consul agent address (default: localhost:8500)\n- **key/path**: Complete path in Consul's K/V store where configuration is stored\n- **query_params** (optional):\n  - `datacenter=dc1`: Specify a different Consul datacenter\n  - `token=SECRET_TOKEN`: Provide ACL token for authentication\n  - `tls=true`: Enable HTTPS communication\n\n### Examples\n\n```go\n// Basic configuration\n\"consul://localhost:8500/services/my-app/config\"\n\n// Multi-datacenter with authentication\n\"consul://consul.my-domain.com/production/database/config?datacenter=us-east-1\u0026token=a1b2-c3d4\"\n\n// Secure connection\n\"consul://127.0.0.1:8500/features/flags?tls=true\"\n```\n\n### Storing Configuration in Consul\n\nThe provider expects the value associated with the key in Consul to be a JSON string.\n\n**Example with Consul CLI:**\n\n```bash\nconsul kv put config/myapp '{\n  \"service_name\": \"my-awesome-app\",\n  \"port\": 8080,\n  \"debug\": true,\n  \"features\": {\n    \"enable_feature_x\": true\n  }\n}'\n```\n\n## Demo\n\n- **[Examples](./examples/)** - Working examples and demos\n\n## Requirements\n\n- Go 1.24+\n- HashiCorp Consul\n- [github.com/hashicorp/consul/api](https://github.com/hashicorp/consul) v1.32.3+\n\n## License\n\nMozilla Public License 2.0 - see the [LICENSE](LICENSE.md) file for details.\n\n---\n\nargus-provider-consul • an AGILira library","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagilira%2Fargus-provider-consul","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fagilira%2Fargus-provider-consul","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagilira%2Fargus-provider-consul/lists"}