{"id":50878339,"url":"https://github.com/librato/disco-java","last_synced_at":"2026-07-03T02:01:12.956Z","repository":{"id":16788216,"uuid":"19546672","full_name":"librato/disco-java","owner":"librato","description":"Service discovery through Zookeeper for Java","archived":true,"fork":false,"pushed_at":"2018-08-09T17:01:19.000Z","size":91,"stargazers_count":22,"open_issues_count":0,"forks_count":7,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-07-08T10:36:26.787Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/librato.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}},"created_at":"2014-05-07T19:06:34.000Z","updated_at":"2024-11-21T03:31:32.000Z","dependencies_parsed_at":"2022-08-28T06:02:10.925Z","dependency_job_id":null,"html_url":"https://github.com/librato/disco-java","commit_stats":null,"previous_names":[],"tags_count":27,"template":false,"template_full_name":null,"purl":"pkg:github/librato/disco-java","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/librato%2Fdisco-java","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/librato%2Fdisco-java/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/librato%2Fdisco-java/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/librato%2Fdisco-java/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/librato","download_url":"https://codeload.github.com/librato/disco-java/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/librato%2Fdisco-java/sbom","scorecard":{"id":588224,"data":{"date":"2025-08-11","repo":{"name":"github.com/librato/disco-java","commit":"529d9ff126194431fe035f1285d53aa5c1b9d565"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.8,"checks":[{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Code-Review","score":1,"reason":"Found 5/29 approved changesets -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"project is archived","details":["Warn: Repository is archived."],"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"License","score":9,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Warn: project license file does not contain an FSF or OSI license."],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 9 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"18 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-5mg8-w23w-74h3","Warn: Project is vulnerable to: GHSA-7g45-4rm6-3mm3","Warn: Project is vulnerable to: GHSA-mvr2-9pj6-7w5j","Warn: Project is vulnerable to: GHSA-5mcr-gq6c-3hq2","Warn: Project is vulnerable to: GHSA-9vjp-v76f-g363","Warn: Project is vulnerable to: GHSA-cqqj-4p63-rrmm","Warn: Project is vulnerable to: GHSA-f256-j965-7f32","Warn: Project is vulnerable to: GHSA-grg4-wf29-r9vv","Warn: Project is vulnerable to: GHSA-p2v9-g2qv-p635","Warn: Project is vulnerable to: GHSA-wm47-8v5p-wjpj","Warn: Project is vulnerable to: GHSA-wx5j-54mm-rqqq","Warn: Project is vulnerable to: GHSA-2qrg-x229-3v8q","Warn: Project is vulnerable to: GHSA-65fg-84f6-3jq3","Warn: Project is vulnerable to: GHSA-f7vh-qwp3-x37m","Warn: Project is vulnerable to: GHSA-fp5r-v3w9-4333","Warn: Project is vulnerable to: GHSA-w9p3-5cr8-m3jj","Warn: Project is vulnerable to: GHSA-2hw2-62cp-p9p7","Warn: Project is vulnerable to: GHSA-7286-pgfv-vxvh"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-20T21:08:11.232Z","repository_id":16788216,"created_at":"2025-08-20T21:08:11.232Z","updated_at":"2025-08-20T21:08:11.232Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35069183,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-03T02:00:05.635Z","response_time":110,"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":[],"created_at":"2026-06-15T12:00:25.786Z","updated_at":"2026-07-03T02:01:12.944Z","avatar_url":"https://github.com/librato.png","language":"Java","funding_links":[],"categories":["服务发现"],"sub_categories":["微服务框架"],"readme":"[![Build Status](https://travis-ci.org/librato/disco-java.svg?branch=master)](https://travis-ci.org/librato/disco-java)\n\n# Disco\n\nSimple zookeeper-based service discovery.\n\n## Requirements\n\n * Java 1.7\n * Zookeeper 3.4.5+\n\nThis library uses Zookeeper nodes to maintain a set of available hosts for\na configured service. A client is automatically updated by Zookeeper/Curator\nwhen a service is added or removed.\n\n## Client usage\n\nThe server allows you to save arbitrary data per node that is accessible from\nthe client via the `Decoder\u003cT\u003e` interface.\n\n```java\nCuratorFramework framework; // Initialize this\nSelectorStrategy selector = new RoundRobinSelectorStrategy();\nDecoder\u003cT\u003e decoder; // Initialize this\nDiscoClient\u003c\u003e client = new DiscoClient\u003cT\u003e(framework, serviceName, selector, decoder);\nclient.start(host, port);\n\nOptional\u003cNode\u003cT\u003e\u003e node = client.getServiceNode();\n```\n\nBased on the selector strategy, the service will return the nodename of a\nconnected service, or Optional.absent() if none are connected.\n\nStop the client on shutdown to cleanly disconnect from Zookeeper.\n\n```java\nclient.stop();\n```\n\n## Service usage\n\n```java\nCuratorFramework framework; // Initialize this\nbyte[] payload; // Initialize this\nDiscoService service = new DiscoService(framework, \"myservice\");\nservice.start(\"hostname\", 4321, true, payload);\n```\n\nAs long as the service is running, this configuration will be associated with the\nZookeeper node `/services/myservice/nodes/hostname:4321` and the `byte[] \npayload` as the node's data. Upon stopping the service, the node will be\nremoved from Zookeeper. The third parameter dictates whether the service adds a\nshutdown hook to stop the disco service. This is useful because of you want to\nremove the service from discovery _before_ peforming a full shutdown, for\nexample before shutting down the HTTP port.\n\n```java\nservice.stop();\n```\n\n## Testing\n\nRun tests with `mvn test`. **Note**: tests assume you have Zookeeper running on\n`localhost:2181`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flibrato%2Fdisco-java","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flibrato%2Fdisco-java","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flibrato%2Fdisco-java/lists"}