{"id":17297367,"url":"https://github.com/lucab/mitch-rs","last_synced_at":"2026-02-19T06:01:31.808Z","repository":{"id":48446527,"uuid":"155885378","full_name":"lucab/mitch-rs","owner":"lucab","description":"mitch: asynchronous membership-gossiping library, based on SWIM/Lifeguard","archived":false,"fork":false,"pushed_at":"2021-07-26T04:16:17.000Z","size":66,"stargazers_count":3,"open_issues_count":11,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-10-27T12:38:58.259Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Rust","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/lucab.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}},"created_at":"2018-11-02T15:27:36.000Z","updated_at":"2023-12-12T16:33:25.000Z","dependencies_parsed_at":"2022-09-05T03:50:36.392Z","dependency_job_id":null,"html_url":"https://github.com/lucab/mitch-rs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lucab/mitch-rs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucab%2Fmitch-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucab%2Fmitch-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucab%2Fmitch-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucab%2Fmitch-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lucab","download_url":"https://codeload.github.com/lucab/mitch-rs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucab%2Fmitch-rs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29604552,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-19T05:11:50.834Z","status":"ssl_error","status_checked_at":"2026-02-19T05:11:38.921Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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-10-15T11:15:42.855Z","updated_at":"2026-02-19T06:01:31.792Z","avatar_url":"https://github.com/lucab.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Mitch\n\n[![Build Status](https://travis-ci.org/lucab/mitch-rs.svg?branch=master)](https://travis-ci.org/lucab/mitch-rs)\n[![crates.io](https://img.shields.io/crates/v/mitch.svg)](https://crates.io/crates/mitch)\n[![Documentation](https://docs.rs/mitch/badge.svg)](https://docs.rs/mitch)\n\nAsynchronous membership-gossiping library, based on SWIM/Lifeguard.\n\nThis crate provides a [tokio]-based swarm membership library, with\ngossiping behavior and weak consistency. Its protocol is based on\n[SWIM][swim] / [Lifeguard][lifeguard], using protobuf and TLS for\ntransport.\n\n[tokio]: https://tokio.rs/\n[swim]: http://www.cs.cornell.edu/projects/Quicksilver/public_pdfs/SWIM.pdf\n[lifeguard]: https://arxiv.org/abs/1707.00788\n\n## Example\n\n```rust\nextern crate mitch;\nextern crate futures;\nextern crate tokio;\nuse futures::prelude::*;\n\nfn main() {\n    let mut runner = tokio::runtime::Runtime::new().unwrap();\n\n    // Start running a swarm, waiting for other peers to reach us.\n    let cfg = mitch::MitchConfig::default();\n    let fut_swarm = cfg.build();\n    let swarm = runner.block_on(fut_swarm).unwrap();\n\n    // Snapshot and print swarm members every 5 secs.\n    let membership = futures::stream::repeat(swarm.membership());\n    let period = std::time::Duration::from_secs(5);\n    let fut_snapshot = tokio::timer::Interval::new_interval(period)\n        .from_err()\n        .zip(membership)\n        .and_then(move |(_, mems)| mems.snapshot())\n        .map_err(|_| ())\n        .for_each(|mems| Ok(println!(\" * Swarm members: {:#?}\", mems)));\n    runner.spawn(fut_snapshot);\n\n    // Keep running for 45 secs.\n    let delay = std::time::Instant::now() + std::time::Duration::from_secs(45);\n    let fut_stop = swarm.stop();\n    let fut_delayed_stop = tokio::timer::Delay::new(delay)\n        .map_err(|e| format!(\"{}\", e).into())\n        .and_then(|_| fut_stop);\n    runner.block_on_all(fut_delayed_stop);\n}\n```\n\nSome more examples are available under [examples](examples).\n\n## License\n\nLicensed under either of\n\n * MIT license - \u003chttp://opensource.org/licenses/MIT\u003e\n * Apache License, Version 2.0 - \u003chttp://www.apache.org/licenses/LICENSE-2.0\u003e\n\nat your option.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucab%2Fmitch-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flucab%2Fmitch-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucab%2Fmitch-rs/lists"}