{"id":20766210,"url":"https://github.com/navono/go-consul-redis","last_synced_at":"2025-11-09T23:03:24.349Z","repository":{"id":74496632,"uuid":"145678561","full_name":"navono/go-consul-redis","owner":"navono","description":"A demo for consul based golang","archived":false,"fork":false,"pushed_at":"2018-08-23T02:18:20.000Z","size":405,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"prometheus","last_synced_at":"2025-03-11T18:54:58.418Z","etag":null,"topics":["consul","goalng","golang-examples","redis-client"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/navono.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-08-22T08:20:24.000Z","updated_at":"2018-08-23T02:18:22.000Z","dependencies_parsed_at":null,"dependency_job_id":"d5f21780-8e16-4533-ab75-22e43a3407f5","html_url":"https://github.com/navono/go-consul-redis","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/navono/go-consul-redis","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/navono%2Fgo-consul-redis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/navono%2Fgo-consul-redis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/navono%2Fgo-consul-redis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/navono%2Fgo-consul-redis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/navono","download_url":"https://codeload.github.com/navono/go-consul-redis/tar.gz/refs/heads/prometheus","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/navono%2Fgo-consul-redis/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":283593385,"owners_count":26861541,"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","status":"online","status_checked_at":"2025-11-09T02:00:05.828Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["consul","goalng","golang-examples","redis-client"],"created_at":"2024-11-17T11:22:01.610Z","updated_at":"2025-11-09T23:03:24.310Z","avatar_url":"https://github.com/navono.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# go-consul\n一个基于`Golang`的`Consul`的示例\n\n# dep\n`Consul`和`Redi`服务均运行在一台IP为`192.168.56.101`的虚拟机中。在虚拟机中运行：\n1. 启动 `Consul`\n\u003e consul agent -dev -client=\"0.0.0.0\"\n2. 启动 `Redis`\n修改`redis.conf`，开放IP和增加登录密码\n\u003e sudo systemctl start redis\n\n3. 启动本程序\n\u003e go run .\\main.go -addrs '192.168.56.101:6379' -port 8888 -ttl '5s'\n\n# verify\n在`Redis`中增加值：\n\u003e set test 1234\n\n获取值：\n\u003e curl http://localhost:8888/test\n\n# reference\n[blog](https://alex.dzyoba.com/blog/go-prometheus-service/)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnavono%2Fgo-consul-redis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnavono%2Fgo-consul-redis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnavono%2Fgo-consul-redis/lists"}