{"id":18403733,"url":"https://github.com/russellluo/superdiscoverer","last_synced_at":"2025-04-07T07:32:46.975Z","repository":{"id":72256826,"uuid":"102247201","full_name":"RussellLuo/superdiscoverer","owner":"RussellLuo","description":"A Supervisor backed service discoverer for automatic service-discovery.","archived":false,"fork":false,"pushed_at":"2017-09-09T08:01:43.000Z","size":15,"stargazers_count":15,"open_issues_count":0,"forks_count":0,"subscribers_count":6,"default_branch":"master","last_synced_at":"2023-08-02T20:39:42.084Z","etag":null,"topics":["consul","service-discovery","supervisor"],"latest_commit_sha":null,"homepage":"","language":"Go","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/RussellLuo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2017-09-03T07:06:20.000Z","updated_at":"2024-06-19T11:04:03.625Z","dependencies_parsed_at":"2023-02-26T21:45:42.772Z","dependency_job_id":null,"html_url":"https://github.com/RussellLuo/superdiscoverer","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RussellLuo%2Fsuperdiscoverer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RussellLuo%2Fsuperdiscoverer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RussellLuo%2Fsuperdiscoverer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RussellLuo%2Fsuperdiscoverer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RussellLuo","download_url":"https://codeload.github.com/RussellLuo/superdiscoverer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247612515,"owners_count":20966768,"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":["consul","service-discovery","supervisor"],"created_at":"2024-11-06T02:48:02.065Z","updated_at":"2025-04-07T07:32:45.893Z","avatar_url":"https://github.com/RussellLuo.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Superdiscoverer\n\nA [Supervisor](http://supervisord.org/) backed service discoverer, which will automatically register and deregister services according to the corresponding event notifications sent by Supervisor.\n\nSuperdiscoverer supports pluggable service registries, which currently only includes [Consul](http://www.consul.io/).\n\n\n## Installation\n\n```bash\n$ go get -u github.com/RussellLuo/superdiscoverer/cmd/superdiscoverer\n```\n\n\n## Quick start\n\n### 1. Add `superdiscoverer` as an event listener\n\nSuppose that:\n\n- Your target service's process name in Supervisor is `test`, and it is listening on `127.0.0.1:8000`\n- Use `consul` as an underlying service registry, and Consul is listening on `127.0.0.1:8500`\n\nthen a typical Supervisor configuration is as follows:\n\n```\n[eventlistener:superdiscoverer]\ncommand=$GOPATH/bin/superdiscoverer --target=test@127.0.0.1:8000 --registrator=consul@127.0.0.1:8500\nevents=PROCESS_STATE_RUNNING,PROCESS_STATE_STOPPING,PROCESS_STATE_EXITED\nstdout_logfile=$LOGPATH/supervisor/logs/superdiscoverer/stdout.log\nstderr_logfile=$LOGPATH/supervisor/logs/superdiscoverer/stderr.log\n```\n\n**NOTE**: Replace `$GOPATH` and `$LOGPATH` with the actual full path on your system.\n\nSee [here](http://supervisord.org/events.html) for more details about event notification protocol of Supervisor.\n\n### 2. Update the event listener into your existing Supervisor\n\n```bash\n$ supervisorctl -c \u003csupervisord.conf\u003e\nsupervisor\u003e update\nsuperdiscoverer: added process group\n```\n\n### 3. Stop or start or restart the `test` process\n\n```bash\nsupervisor\u003e stop test\ntest: stopped\nsupervisor\u003e start test\ntest: started\nsupervisor\u003e restart test\ntest: stopped\ntest: started\n```\n\n### 4. Check out\n\n- Check out the stderr log of `superdiscoverer` to see event notifications sent by Supervisor\n- Check out the daemon log of Consul to see the behaviors of service registering/deregistering\n- Check out the healthy services managed by Consul, by using its command-line interface or client APIs\n\n\n## License\n\n[MIT](http://opensource.org/licenses/MIT)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frussellluo%2Fsuperdiscoverer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frussellluo%2Fsuperdiscoverer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frussellluo%2Fsuperdiscoverer/lists"}