{"id":13397007,"url":"https://github.com/hashicorp/memberlist","last_synced_at":"2025-09-09T20:12:23.763Z","repository":{"id":10522421,"uuid":"12712630","full_name":"hashicorp/memberlist","owner":"hashicorp","description":"Golang package for gossip based membership and failure detection","archived":false,"fork":false,"pushed_at":"2025-07-06T05:53:03.000Z","size":1265,"stargazers_count":3898,"open_issues_count":110,"forks_count":463,"subscribers_count":347,"default_branch":"master","last_synced_at":"2025-08-21T13:38:24.987Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/hashicorp.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":".github/CODEOWNERS","security":"security.go","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2013-09-09T20:59:27.000Z","updated_at":"2025-08-21T11:57:02.000Z","dependencies_parsed_at":"2023-02-19T10:01:29.503Z","dependency_job_id":"2b61de33-0b2a-4563-883e-f29730371299","html_url":"https://github.com/hashicorp/memberlist","commit_stats":{"total_commits":591,"total_committers":67,"mean_commits":8.82089552238806,"dds":0.5854483925549916,"last_synced_commit":"3f82dc10a89f82efe300228752f7077d0d9f87e4"},"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"purl":"pkg:github/hashicorp/memberlist","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hashicorp%2Fmemberlist","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hashicorp%2Fmemberlist/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hashicorp%2Fmemberlist/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hashicorp%2Fmemberlist/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hashicorp","download_url":"https://codeload.github.com/hashicorp/memberlist/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hashicorp%2Fmemberlist/sbom","scorecard":{"id":457069,"data":{"date":"2025-08-11","repo":{"name":"github.com/hashicorp/memberlist","commit":"400e96ebe56c5029c2c2abb0875ddb8f1a22a2f6"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":7.8,"checks":[{"name":"Code-Review","score":10,"reason":"all changesets reviewed","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":"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":"Maintained","score":10,"reason":"30 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10","details":null,"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":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","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":"Token-Permissions","score":10,"reason":"GitHub workflow tokens follow principle of least privilege","details":["Info: topLevel 'contents' permission set to 'read': .github/workflows/check.yml:11","Info: no jobLevel write permissions found"],"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":"Pinned-Dependencies","score":10,"reason":"all dependencies are pinned","details":["Info:  13 out of  13 GitHub-owned GitHubAction dependencies pinned","Info:   1 out of   1 third-party GitHubAction dependencies pinned"],"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":"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":"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":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Mozilla Public License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"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":"Security-Policy","score":10,"reason":"security policy file detected","details":["Info: security policy file detected: github.com/hashicorp/.github/SECURITY.md:1","Info: Found linked content: github.com/hashicorp/.github/SECURITY.md:1","Info: Found disclosure, vulnerability, and/or timelines in security policy: github.com/hashicorp/.github/SECURITY.md:1","Info: Found text in security policy: github.com/hashicorp/.github/SECURITY.md:1"],"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":"Branch-Protection","score":6,"reason":"branch protection is not maximal on development and all release branches","details":["Info: 'allow deletion' disabled on branch 'master'","Info: 'force pushes' disabled on branch 'master'","Warn: 'branch protection settings apply to administrators' is disabled on branch 'master'","Info: 'stale review dismissal' is required to merge on branch 'master'","Warn: required approving review count is 1 on branch 'master'","Info: codeowner review is required on branch 'master'","Info: 'last push approval' is required to merge on branch 'master'","Warn: no status checks found to merge onto branch 'master'","Info: PRs are required in order to make changes on 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 30 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":7,"reason":"3 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GO-2025-3487 / GHSA-hcg3-q754-cr77","Warn: Project is vulnerable to: GO-2025-3503 / GHSA-qxp5-gwg8-xv66","Warn: Project is vulnerable to: GO-2025-3595 / GHSA-vvgc-356p-c3xw"],"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-19T09:59:40.137Z","repository_id":10522421,"created_at":"2025-08-19T09:59:40.137Z","updated_at":"2025-08-19T09:59:40.137Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274357333,"owners_count":25270673,"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-09-09T02:00:10.223Z","response_time":80,"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":"2024-07-30T18:01:09.185Z","updated_at":"2025-09-09T20:12:23.727Z","avatar_url":"https://github.com/hashicorp.png","language":"Go","readme":"# memberlist [![GoDoc](https://godoc.org/github.com/hashicorp/memberlist?status.png)](https://godoc.org/github.com/hashicorp/memberlist) [![CircleCI](https://circleci.com/gh/hashicorp/memberlist.svg?style=svg)](https://circleci.com/gh/hashicorp/memberlist)\n\nmemberlist is a [Go](http://www.golang.org) library that manages cluster\nmembership and member failure detection using a gossip based protocol.\n\nThe use cases for such a library are far-reaching: all distributed systems\nrequire membership, and memberlist is a re-usable solution to managing\ncluster membership and node failure detection.\n\nmemberlist is eventually consistent but converges quickly on average.\nThe speed at which it converges can be heavily tuned via various knobs\non the protocol. Node failures are detected and network partitions are partially\ntolerated by attempting to communicate to potentially dead nodes through\nmultiple routes.\n\n## Building\n\nIf you wish to build memberlist you'll need Go version 1.2+ installed.\n\nPlease check your installation with:\n\n```\ngo version\n```\n\n## Usage\n\nMemberlist is surprisingly simple to use. An example is shown below:\n\n```go\n/* Create the initial memberlist from a safe configuration.\n   Please reference the godoc for other default config types.\n   http://godoc.org/github.com/hashicorp/memberlist#Config\n*/\nlist, err := memberlist.Create(memberlist.DefaultLocalConfig())\nif err != nil {\n\tpanic(\"Failed to create memberlist: \" + err.Error())\n}\n\n// Join an existing cluster by specifying at least one known member.\nn, err := list.Join([]string{\"1.2.3.4\"})\nif err != nil {\n\tpanic(\"Failed to join cluster: \" + err.Error())\n}\n\n// Ask for members of the cluster\nfor _, member := range list.Members() {\n\tfmt.Printf(\"Member: %s %s\\n\", member.Name, member.Addr)\n}\n\n// Continue doing whatever you need, memberlist will maintain membership\n// information in the background. Delegates can be used for receiving\n// events when members join or leave.\n```\n\nThe most difficult part of memberlist is configuring it since it has many\navailable knobs in order to tune state propagation delay and convergence times.\nMemberlist provides a default configuration that offers a good starting point,\nbut errs on the side of caution, choosing values that are optimized for\nhigher convergence at the cost of higher bandwidth usage.\n\nFor complete documentation, see the associated [Godoc](http://godoc.org/github.com/hashicorp/memberlist).\n\n## Protocol\n\nmemberlist is based on [\"SWIM: Scalable Weakly-consistent Infection-style Process Group Membership Protocol\"](http://ieeexplore.ieee.org/document/1028914/). However, we extend the protocol in a number of ways:\n\n* Several extensions are made to increase propagation speed and\nconvergence rate.\n* Another set of extensions, that we call Lifeguard, are made to make memberlist more robust in the presence of slow message processing (due to factors such as CPU starvation, and network delay or loss).\n\nFor details on all of these extensions, please read our paper \"[Lifeguard : SWIM-ing with Situational Awareness](https://arxiv.org/abs/1707.00788)\", along with the memberlist source.  We welcome any questions related\nto the protocol on our issue tracker.\n\n## Metrics Emission and Compatibility\n\nThis library can emit metrics using either `github.com/armon/go-metrics` or `github.com/hashicorp/go-metrics`. Choosing between the libraries is controlled via build tags. \n\n**Build Tags**\n* `armonmetrics` - Using this tag will cause metrics to be routed to `armon/go-metrics`\n* `hashicorpmetrics` - Using this tag will cause all metrics to be routed to `hashicorp/go-metrics`\n\nIf no build tag is specified, the default behavior is to use `armon/go-metrics`. \n\n**Deprecating `armon/go-metrics`**\n\nEmitting metrics to `armon/go-metrics` is officially deprecated. Usage of `armon/go-metrics` will remain the default until mid-2025 with opt-in support continuing to the end of 2025.\n\n**Migration**\nTo migrate an application currently using the older `armon/go-metrics` to instead use `hashicorp/go-metrics` the following should be done.\n\n1. Upgrade libraries using `armon/go-metrics` to consume `hashicorp/go-metrics/compat` instead. This should involve only changing import statements. All repositories in the `hashicorp` namespace\n2. Update an applications library dependencies to those that have the compatibility layer configured.\n3. Update the application to use `hashicorp/go-metrics` for configuring metrics export instead of `armon/go-metrics`\n   * Replace all application imports of `github.com/armon/go-metrics` with `github.com/hashicorp/go-metrics`\n   * Instrument your build system to build with the `hashicorpmetrics` tag.\n\nEventually once the default behavior changes to use `hashicorp/go-metrics` by default (mid-2025), you can drop the `hashicorpmetrics` build tag.\n","funding_links":[],"categories":["Go","开源类库","Tool-kits \u0026 helpers","Open source library","\u003ca id=\"1d9dec1320a5d774dc8e0e7604edfcd3\"\u003e\u003c/a\u003e工具-新添加的","\u003ca name=\"Go\"\u003e\u003c/a\u003eGo"],"sub_categories":["算法","Algorithm","\u003ca id=\"8f1b9c5c2737493524809684b934d49a\"\u003e\u003c/a\u003e文章\u0026\u0026视频"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhashicorp%2Fmemberlist","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhashicorp%2Fmemberlist","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhashicorp%2Fmemberlist/lists"}