{"id":20048773,"url":"https://github.com/libopenstorage/gossip","last_synced_at":"2025-04-05T16:10:13.863Z","repository":{"id":36625630,"uuid":"40931848","full_name":"libopenstorage/gossip","owner":"libopenstorage","description":"Go implementation of the Gossip protocol","archived":false,"fork":false,"pushed_at":"2024-03-11T18:11:54.000Z","size":4762,"stargazers_count":125,"open_issues_count":4,"forks_count":24,"subscribers_count":29,"default_branch":"master","last_synced_at":"2024-06-18T14:12:45.263Z","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":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/libopenstorage.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":"2015-08-17T21:56:32.000Z","updated_at":"2024-06-14T17:08:18.000Z","dependencies_parsed_at":"2024-06-18T14:02:21.914Z","dependency_job_id":"011c3dac-05bd-48dc-9600-0a52e24c3fbc","html_url":"https://github.com/libopenstorage/gossip","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libopenstorage%2Fgossip","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libopenstorage%2Fgossip/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libopenstorage%2Fgossip/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libopenstorage%2Fgossip/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/libopenstorage","download_url":"https://codeload.github.com/libopenstorage/gossip/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247361695,"owners_count":20926643,"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":[],"created_at":"2024-11-13T11:46:07.364Z","updated_at":"2025-04-05T16:10:13.803Z","avatar_url":"https://github.com/libopenstorage.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gossip\n\n[![Travis branch](https://img.shields.io/travis/libopenstorage/gossip/master.svg)](https://travis-ci.org/libopenstorage/gossip)\n[![Code Coverage](https://codecov.io/gh/libopenstorage/gossip/branch/master/graph/badge.svg)](https://codecov.io/gh/libopenstorage/gossip)\n\n\nGo implementation of the Gossip protocol.\n\n## Overview\n\nThis package provides an implementation of an eventually consistent in-memory\ndata store. The data store values are exchanged using a push-pull gossip protocol.\n\n```\n// Create a gossiper\ng := NewGossiper(\"\u003cip\u003e:\u003cport\u003e\", \"\u003cunique node id\u003e\", \"\u003cpeer-list\u003e\")\n// Add peer nodes with whom you want to gossip\ng.AddNode(\"\u003cpeer_ip\u003e:\u003cpeer_port\u003e\")\n...\n// update self values\ng.UpdateSelf(\"\u003csome_key\u003e\", \"\u003cany_value\u003e\")\n// start gossip\ng.Start()\n```\n\nThese values are exchanged using the gossip protocol between the configured\npeers.\n\n```\n// Get the current view of the world\nstoreKeys = g.GetStoreKeys()\nfor _, key := range storeKeys.List {\n\tnodeInfoMap := g.GetStoreKeyValue(key)\n\tfor id,  nodeInfo := nodeInfoList.List {\n\t\t// if nodeInfo.Status != types.NODE_STATUS_INVALID\n        // then nodeInfo has valid data.\n\t}\n}\n\n// Stop gossiping\ng.Stop()\n```\n\n## Contributing\n\n### Testing\n\nTo test, run `make test`. This will run the unit tests\n\n### Vendoring\n\nFor vendoring, we use [dep](https://golang.github.io/dep/). Some useful dep commands are:\n-  `dep ensure`: install the project's dependencies\n-  `dep ensure -update`: update the locked versions of all dependencies\n-  `dep ensure -add github.com/pkg/errors`: add a dependency to the project\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flibopenstorage%2Fgossip","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flibopenstorage%2Fgossip","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flibopenstorage%2Fgossip/lists"}