{"id":25349828,"url":"https://github.com/metaswitch/vigil","last_synced_at":"2025-10-29T19:30:58.253Z","repository":{"id":52406289,"uuid":"132936637","full_name":"Metaswitch/Vigil","owner":"Metaswitch","description":"Software watchdog library for Rust services","archived":false,"fork":false,"pushed_at":"2023-01-19T19:15:50.000Z","size":27,"stargazers_count":10,"open_issues_count":0,"forks_count":2,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-12-13T12:48:07.395Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","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/Metaswitch.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING","funding":null,"license":"LICENSE-APACHE-2.0","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-05-10T18:01:12.000Z","updated_at":"2024-01-24T15:25:20.000Z","dependencies_parsed_at":"2023-02-11T18:00:30.738Z","dependency_job_id":null,"html_url":"https://github.com/Metaswitch/Vigil","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Metaswitch%2FVigil","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Metaswitch%2FVigil/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Metaswitch%2FVigil/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Metaswitch%2FVigil/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Metaswitch","download_url":"https://codeload.github.com/Metaswitch/Vigil/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238878934,"owners_count":19545855,"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":"2025-02-14T16:58:21.096Z","updated_at":"2025-10-29T19:30:57.916Z","avatar_url":"https://github.com/Metaswitch.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Vigil\n\n[![Crates.io - Vigil](https://img.shields.io/crates/v/vigil.svg)](https://crates.io/crates/vigil) [![Build Status](https://travis-ci.org/Metaswitch/Vigil.svg?branch=master)](https://travis-ci.org/Metaswitch/Vigil) [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT) [![License: Apache-2.0](https://img.shields.io/badge/License-Apache--2.0-green.svg)](http://www.apache.org/licenses/LICENSE-2.0)\n\nSoftware watchdog library for Rust services.\n\n## Documentation\n\nhttps://docs.rs/vigil/\n\n## Usage\n\nInstall from crates.io by adding `vigil` to your `Cargo.toml`:\n\n```\n[dependencies]\nvigil = \"0.1\"\n```\n\nNow you can create a Vigil instance which the watched code must notify every so often.  If the watched code misses too many notification ticks, the pre-programmed callbacks will be fired to allow you to handle the situation (gather diagnostics, raise an alarm, cancel the stalled task, or even kill the whole process).\n\n```rust\nlet vigil = Vigil::create(10_000,\n                          Some(|| warn!(\"Watched code missed a watchdog check\"),\n                          Some(|| error!(\"Watched code missed multiple watchdog checks!\"),\n                          Some(|| { error!(\"Deadlock detected, exiting\"); std::process::exit(101));\n\nloop {\n  do_work();\n  vigil.notify();\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmetaswitch%2Fvigil","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmetaswitch%2Fvigil","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmetaswitch%2Fvigil/lists"}