{"id":50798741,"url":"https://github.com/wood-jp/runner","last_synced_at":"2026-06-12T17:05:39.236Z","repository":{"id":358760594,"uuid":"1242952125","full_name":"wood-jp/runner","owner":"wood-jp","description":"Easily bootstrap a long-running server","archived":false,"fork":false,"pushed_at":"2026-05-19T00:02:25.000Z","size":15,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-19T01:45:57.573Z","etag":null,"topics":["boilerplate","bootstrap","go","golang","graceful-shutdown","server","signal-handling"],"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/wood-jp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":"SECURITY.md","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":"2026-05-18T23:12:42.000Z","updated_at":"2026-05-18T23:51:36.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/wood-jp/runner","commit_stats":null,"previous_names":["wood-jp/runner"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/wood-jp/runner","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wood-jp%2Frunner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wood-jp%2Frunner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wood-jp%2Frunner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wood-jp%2Frunner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wood-jp","download_url":"https://codeload.github.com/wood-jp/runner/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wood-jp%2Frunner/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34253959,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-12T02:00:06.859Z","response_time":109,"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"}},"keywords":["boilerplate","bootstrap","go","golang","graceful-shutdown","server","signal-handling"],"created_at":"2026-06-12T17:05:37.875Z","updated_at":"2026-06-12T17:05:39.232Z","avatar_url":"https://github.com/wood-jp.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# runner\n\n\u003c!-- badges --\u003e\n[![Go Version](https://img.shields.io/github/go-mod/go-version/wood-jp/runner)](https://pkg.go.dev/github.com/wood-jp/runner)\n[![CI](https://github.com/wood-jp/runner/actions/workflows/ci.yml/badge.svg)](https://github.com/wood-jp/runner/actions/workflows/ci.yml)\n[![Coverage Status](https://coveralls.io/repos/github/wood-jp/runner/badge.svg?branch=main)](https://coveralls.io/github/wood-jp/runner?branch=main)\n[![Release](https://img.shields.io/github/v/release/wood-jp/runner)](https://github.com/wood-jp/runner/releases)\n[![Go Report Card](https://goreportcard.com/badge/github.com/wood-jp/runner)](https://goreportcard.com/report/github.com/wood-jp/runner)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)\n[![Go Reference](https://pkg.go.dev/badge/github.com/wood-jp/runner.svg)](https://pkg.go.dev/github.com/wood-jp/runner)\n\u003c!-- /badges --\u003e\n\nBootstrap a server process in one call: JSON logger, OS signal handling, and graceful shutdown via [task](https://github.com/wood-jp/task).\n\n## Stability\n\nv1.x releases make no breaking changes to exported APIs. New functionality may be added in minor releases; patches are bug fixes, or administrative work only.\n\n## Installation\n\nGo 1.26.2 or later.\n\n```bash\ngo get github.com/wood-jp/runner\n```\n\n## Usage\n\nImplement a `Runnable` and pass it to `Run`:\n\n```go\nconst serviceName = \"my-service\"\n\nfunc main() {\n    runner.Run(serviceName, run)\n}\n\nfunc run(tm runner.Runner, logger *slog.Logger) error {\n    return tm.Run(myTask{})\n}\n```\n\n`Run` creates a JSON logger tagged with `serviceName`, starts an OS signal handler (SIGINT, SIGTERM, SIGQUIT), calls the `Runnable`, then waits for all tasks to finish. On error it calls `os.Exit(1)`, so `main()` can be a single call.\n\nThe `LOG_LEVEL` environment variable overrides the log level (e.g. `LOG_LEVEL=debug`). It defaults to `INFO`.\n\nThe `Runner` interface exposes the subset of [task.Manager](https://github.com/wood-jp/task) that a `Runnable` needs:\n\n```go\ntype Runner interface {\n    Run(tasks ...task.Task) error\n    RunEphemeral(tasks ...task.Task) error\n    Cleanup(f func() error)\n    Context() context.Context\n}\n```\n\n## Contributing\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md).\n\n## Security\n\nSee [SECURITY.md](SECURITY.md).\n\n## Attribution\n\n*This library is a simplified fork of one written by [wood-jp](https://github.com/wood-jp) at [Zircuit](https://www.zircuit.com/). The original code is available here: [zkr-go-common-public/runner](https://github.com/zircuit-labs/zkr-go-common-public/tree/main/runner)*\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwood-jp%2Frunner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwood-jp%2Frunner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwood-jp%2Frunner/lists"}