{"id":13822871,"url":"https://github.com/dmexe/failsafe-rs","last_synced_at":"2026-04-07T04:31:38.231Z","repository":{"id":32945607,"uuid":"147249678","full_name":"dmexe/failsafe-rs","owner":"dmexe","description":"A circuit breaker implementation for rust","archived":false,"fork":false,"pushed_at":"2024-07-16T16:56:17.000Z","size":148,"stargazers_count":202,"open_issues_count":5,"forks_count":15,"subscribers_count":2,"default_branch":"master","last_synced_at":"2026-01-02T08:32:24.490Z","etag":null,"topics":["circuit-breaker","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dmexe.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"zenodo":null}},"created_at":"2018-09-03T20:17:31.000Z","updated_at":"2025-12-28T06:39:50.000Z","dependencies_parsed_at":"2024-07-16T20:34:08.355Z","dependency_job_id":"44d56a26-f417-4252-bdfc-70ec33d5212e","html_url":"https://github.com/dmexe/failsafe-rs","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/dmexe/failsafe-rs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmexe%2Ffailsafe-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmexe%2Ffailsafe-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmexe%2Ffailsafe-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmexe%2Ffailsafe-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dmexe","download_url":"https://codeload.github.com/dmexe/failsafe-rs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmexe%2Ffailsafe-rs/sbom","scorecard":{"id":347763,"data":{"date":"2025-08-11","repo":{"name":"github.com/dmexe/failsafe-rs","commit":"5bf89775ea320f288f11935f3b5526e63a865d2a"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.2,"checks":[{"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":"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":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"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":"Code-Review","score":2,"reason":"Found 7/27 approved changesets -- score normalized to 2","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":"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":"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":"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":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: 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":"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":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"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 23 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":6,"reason":"4 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: RUSTSEC-2021-0145 / GHSA-g98v-hv3f-hcfr","Warn: Project is vulnerable to: RUSTSEC-2024-0375","Warn: Project is vulnerable to: GHSA-rr8g-9fpq-6wmg","Warn: Project is vulnerable to: RUSTSEC-2025-0023"],"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-18T07:32:50.624Z","repository_id":32945607,"created_at":"2025-08-18T07:32:50.624Z","updated_at":"2025-08-18T07:32:50.624Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31500397,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T03:10:19.677Z","status":"ssl_error","status_checked_at":"2026-04-07T03:10:13.982Z","response_time":105,"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":["circuit-breaker","rust"],"created_at":"2024-08-04T08:02:21.637Z","updated_at":"2026-04-07T04:31:38.210Z","avatar_url":"https://github.com/dmexe.png","language":"Rust","funding_links":[],"categories":["Rust","\u003ca name=\"Rust\"\u003e\u003c/a\u003eRust"],"sub_categories":[],"readme":"# Failsafe\n\n[![Сrate](https://img.shields.io/crates/v/failsafe.svg)](https://crates.io/crates/failsafe)\n[![Вocumentation](https://docs.rs/failsafe/badge.svg)](https://docs.rs/failsafe)\n[![CircleCI](https://circleci.com/gh/dmexe/failsafe-rs.svg?style=svg)](https://circleci.com/gh/dmexe/failsafe-rs)\n[![Appveyor](https://ci.appveyor.com/api/projects/status/c0qrj9dbskneunjg/branch/master?svg=true)](https://ci.appveyor.com/project/dmexe/failsafe-rs/branch/master)\n\nA circuit breaker implementation which used to detect failures and encapsulates the logic of preventing a\nfailure from constantly recurring, during maintenance, temporary external system failure or unexpected\nsystem difficulties.\n\n* [https://martinfowler.com/bliki/CircuitBreaker.html](https://martinfowler.com/bliki/CircuitBreaker.html)\n* [Read documentation](https://docs.rs/failsafe/1.3.0/failsafe)\n\n# Features\n\n* Working with both `Fn() -\u003e Result` and `Future` (optional via default\n  `futures-support` feature).\n* Backoff strategies: `constant`, `exponential`, `equal_jittered`, `full_jittered`\n* Failure detection policies: `consecutive_failures`, `success_rate_over_time_window`\n* Minimum rust version: 1.63\n\n# Usage\n\nAdd this to your Cargo.toml:\n\n```toml\nfailsafe = \"1.3.0\"\n```\n\n# Example\n\nUsing default backoff strategy and failure accrual policy.\n\n```rust\nuse failsafe::{Config, CircuitBreaker, Error};\n\n// A function that sometimes failed.\nfn dangerous_call() -\u003e Result\u003c(), ()\u003e {\n  if thread_rng().gen_range(0, 2) == 0 {\n    return Err(())\n  }\n  Ok(())\n}\n\n// Create a circuit breaker which configured by reasonable default backoff and\n// failure accrual policy.\nlet circuit_breaker = Config::new().build();\n\n// Call the function in a loop, after some iterations the circuit breaker will\n// be in a open state and reject next calls.\nfor n in 0..100 {\n  match circuit_breaker.call(|| dangerous_call()) {\n    Err(Error::Inner(_)) =\u003e {\n      eprintln!(\"{}: fail\", n);\n    },\n    Err(Error::Rejected) =\u003e {\n       eprintln!(\"{}: rejected\", n);\n       break;\n    },\n    _ =\u003e {}\n  }\n}\n```\n\nOr configure custom backoff and policy:\n\n```rust\nuse std::time::Duration;\nuse failsafe::{backoff, failure_policy, CircuitBreaker};\n\n// Create an exponential growth backoff which starts from 10s and ends with 60s.\nlet backoff = backoff::exponential(Duration::from_secs(10), Duration::from_secs(60));\n\n// Create a policy which failed when three consecutive failures were made.\nlet policy = failure_policy::consecutive_failures(3, backoff);\n\n// Creates a circuit breaker with given policy.\nlet circuit_breaker = Config::new()\n  .failure_policy(policy)\n  .build();\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmexe%2Ffailsafe-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdmexe%2Ffailsafe-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmexe%2Ffailsafe-rs/lists"}