{"id":11607742,"name":"github.com/ifnotnil/daemon","ecosystem":"go","description":"Package daemon encapsulates the core functionality required for running an application as a daemon or service,\nand it ensures a graceful shutdown when stop conditions are met.\n\nStop conditions:\n\nThe shutdown can be initiated manually at any point by calling ShutDown() daemon's receiver function.\n\nExample usage:\n\nContext:\nThe context provided by the daemon struct .CTX() should be passed downstream to the rest of the code.\nIt will get cancelled by default after the shutdown callbacks are done or if it configured as a shutdown callback\nby passing daemon.CancelCTX in the Defer() function.\n\nShutdown callbacks:\nUsing the daemon function Defer(f ...func(context.Context)) you can register callback functions that will be called\n(in LIFO order) once the graceful shutdown is initiated. The context that is given to each shutdown callback is not the same with .CTX().\nIt will be the parentCTX with a separate timeout (shutdown grace period) depending on the configuration.\n\nFatal errors channel:\nDaemon provides an error channel FatalErrorsChannel() chan\u003c- error that can be used downstream to push errors\nthat are considered catastrophic into it. Once an error received in this channel the daemon struct will initiate\nthe graceful shutdown process.","homepage":"https://github.com/ifnotnil/daemon","licenses":"MIT","normalized_licenses":["MIT"],"repository_url":"https://github.com/ifnotnil/daemon","keywords_array":[],"namespace":"github.com/ifnotnil","versions_count":3,"first_release_published_at":"2025-05-04T08:14:11.000Z","latest_release_published_at":"2025-10-07T16:51:08.000Z","latest_release_number":"v0.0.3","last_synced_at":"2026-04-27T23:33:08.076Z","created_at":"2025-05-05T08:03:37.980Z","updated_at":"2026-04-27T23:33:08.077Z","registry_url":"https://pkg.go.dev/github.com/ifnotnil/daemon","install_command":"go get github.com/ifnotnil/daemon","documentation_url":"https://pkg.go.dev/github.com/ifnotnil/daemon#section-documentation","metadata":{},"repo_metadata":{"id":291377774,"uuid":"977428415","full_name":"ifnotnil/daemon","owner":"ifnotnil","description":"Go tiny daemon/service wrapper","archived":false,"fork":false,"pushed_at":"2025-10-06T19:34:02.000Z","size":192,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-06T21:22:53.093Z","etag":null,"topics":["daemon","golang","golang-library"],"latest_commit_sha":null,"homepage":"","language":"Go","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/ifnotnil.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-05-04T07:26:29.000Z","updated_at":"2025-09-23T17:40:13.000Z","dependencies_parsed_at":"2025-05-04T09:21:49.390Z","dependency_job_id":"18807737-633f-444c-8298-388ec9bf9c5c","html_url":"https://github.com/ifnotnil/daemon","commit_stats":null,"previous_names":["ifnotnil/daemon"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/ifnotnil/daemon","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ifnotnil%2Fdaemon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ifnotnil%2Fdaemon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ifnotnil%2Fdaemon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ifnotnil%2Fdaemon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ifnotnil","download_url":"https://codeload.github.com/ifnotnil/daemon/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ifnotnil%2Fdaemon/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278692255,"owners_count":26029397,"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-10-06T02:00:05.630Z","response_time":65,"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"},"owner_record":{"login":"ifnotnil","name":"ifnotnil","uuid":"188393447","kind":"organization","description":"a collection of golang libraries and tools","email":null,"website":null,"location":null,"twitter":null,"company":null,"icon_url":"https://avatars.githubusercontent.com/u/188393447?v=4","repositories_count":1,"last_synced_at":"2024-11-17T18:42:28.330Z","metadata":{"has_sponsors_listing":false},"html_url":"https://github.com/ifnotnil","funding_links":[],"total_stars":0,"followers":0,"following":0,"created_at":"2024-11-17T18:42:28.352Z","updated_at":"2024-11-17T18:42:28.352Z","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ifnotnil","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ifnotnil/repositories"},"tags":[{"name":"v0.0.2","sha":"fe3e2265168ccb0b08df79dc5bb4e27e578700fe","kind":"commit","published_at":"2025-07-21T19:08:35.000Z","download_url":"https://codeload.github.com/ifnotnil/daemon/tar.gz/v0.0.2","html_url":"https://github.com/ifnotnil/daemon/releases/tag/v0.0.2","dependencies_parsed_at":null,"dependency_job_id":null,"purl":"pkg:github/ifnotnil/daemon@v0.0.2","tag_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ifnotnil%2Fdaemon/tags/v0.0.2","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ifnotnil%2Fdaemon/tags/v0.0.2/manifests"},{"name":"v0.0.1","sha":"2c8bd3ed1d09edb17e6d6da23942bcc456f9a5a2","kind":"commit","published_at":"2025-05-04T08:14:11.000Z","download_url":"https://codeload.github.com/ifnotnil/daemon/tar.gz/v0.0.1","html_url":"https://github.com/ifnotnil/daemon/releases/tag/v0.0.1","dependencies_parsed_at":null,"dependency_job_id":null,"purl":"pkg:github/ifnotnil/daemon@v0.0.1","tag_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ifnotnil%2Fdaemon/tags/v0.0.1","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ifnotnil%2Fdaemon/tags/v0.0.1/manifests"}]},"repo_metadata_updated_at":"2025-10-06T22:36:18.184Z","dependent_packages_count":0,"downloads":null,"downloads_period":null,"dependent_repos_count":0,"rankings":{"downloads":null,"dependent_repos_count":5.8944038849962705,"dependent_packages_count":5.524087956838214,"stargazers_count":null,"forks_count":null,"docker_downloads_count":null,"average":5.709245920917242},"purl":"pkg:golang/github.com/ifnotnil/daemon","advisories":[],"docker_usage_url":"https://docker.ecosyste.ms/usage/go/github.com/ifnotnil/daemon","docker_dependents_count":null,"docker_downloads_count":null,"usage_url":"https://repos.ecosyste.ms/usage/go/github.com/ifnotnil/daemon","dependent_repositories_url":"https://repos.ecosyste.ms/api/v1/usage/go/github.com/ifnotnil/daemon/dependencies","status":null,"funding_links":[],"critical":null,"issue_metadata":{"last_synced_at":"2025-10-06T22:09:51.439Z","issues_count":0,"pull_requests_count":13,"avg_time_to_close_issue":null,"avg_time_to_close_pull_request":145524.0,"issues_closed_count":0,"pull_requests_closed_count":7,"pull_request_authors_count":2,"issue_authors_count":0,"avg_comments_per_issue":null,"avg_comments_per_pull_request":0.23076923076923078,"merged_pull_requests_count":6,"bot_issues_count":0,"bot_pull_requests_count":11,"past_year_issues_count":0,"past_year_pull_requests_count":13,"past_year_avg_time_to_close_issue":null,"past_year_avg_time_to_close_pull_request":145524.0,"past_year_issues_closed_count":0,"past_year_pull_requests_closed_count":7,"past_year_pull_request_authors_count":2,"past_year_issue_authors_count":0,"past_year_avg_comments_per_issue":null,"past_year_avg_comments_per_pull_request":0.23076923076923078,"past_year_bot_issues_count":0,"past_year_bot_pull_requests_count":11,"past_year_merged_pull_requests_count":6,"issues_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/repositories/ifnotnil%2Fdaemon/issues","maintainers":[{"login":"moukoublen","count":2,"url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors/moukoublen"}],"active_maintainers":[{"login":"moukoublen","count":2,"url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors/moukoublen"}]},"versions_url":"https://packages.ecosyste.ms/api/v1/registries/proxy.golang.org/packages/github.com%2Fifnotnil%2Fdaemon/versions","version_numbers_url":"https://packages.ecosyste.ms/api/v1/registries/proxy.golang.org/packages/github.com%2Fifnotnil%2Fdaemon/version_numbers","dependent_packages_url":"https://packages.ecosyste.ms/api/v1/registries/proxy.golang.org/packages/github.com%2Fifnotnil%2Fdaemon/dependent_packages","related_packages_url":"https://packages.ecosyste.ms/api/v1/registries/proxy.golang.org/packages/github.com%2Fifnotnil%2Fdaemon/related_packages","codemeta_url":"https://packages.ecosyste.ms/api/v1/registries/proxy.golang.org/packages/github.com%2Fifnotnil%2Fdaemon/codemeta","maintainers":[]}