{"id":42147937,"url":"https://github.com/peter-mount/go-kernel","last_synced_at":"2026-01-26T18:00:45.906Z","repository":{"id":57567237,"uuid":"328378961","full_name":"peter-mount/go-kernel","owner":"peter-mount","description":"A small microkernel for go applications allowing for features to be reusable services \u0026 manages the life cycle of those services.","archived":false,"fork":false,"pushed_at":"2025-02-18T19:59:47.000Z","size":134,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-18T20:43:08.239Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/peter-mount.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}},"created_at":"2021-01-10T12:34:25.000Z","updated_at":"2025-02-18T19:59:51.000Z","dependencies_parsed_at":"2023-11-09T12:26:38.957Z","dependency_job_id":"540b6157-33da-4e60-85d0-11ea6ff395c5","html_url":"https://github.com/peter-mount/go-kernel","commit_stats":{"total_commits":57,"total_committers":1,"mean_commits":57.0,"dds":0.0,"last_synced_commit":"cffb95a03dd0a1a659ba65ab46b6cc5ba0e4a2ca"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/peter-mount/go-kernel","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peter-mount%2Fgo-kernel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peter-mount%2Fgo-kernel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peter-mount%2Fgo-kernel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peter-mount%2Fgo-kernel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/peter-mount","download_url":"https://codeload.github.com/peter-mount/go-kernel/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peter-mount%2Fgo-kernel/sbom","scorecard":{"id":728611,"data":{"date":"2025-08-11","repo":{"name":"github.com/peter-mount/go-kernel","commit":"5604474bedd726eee88f046f7f518a1c754d2416"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.9,"checks":[{"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":"Code-Review","score":0,"reason":"Found 0/18 approved changesets -- score normalized to 0","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":"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":"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":"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":"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":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: goCommand not pinned by hash: gendocs.sh:34","Info:   0 out of   1 goCommand dependencies pinned"],"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":"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":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: 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":"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 15 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":8,"reason":"2 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GO-2025-3503 / GHSA-qxp5-gwg8-xv66","Warn: Project is vulnerable to: GO-2025-3595 / GHSA-vvgc-356p-c3xw"],"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-22T13:42:14.444Z","repository_id":57567237,"created_at":"2025-08-22T13:42:14.444Z","updated_at":"2025-08-22T13:42:14.444Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28784093,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-26T13:55:28.044Z","status":"ssl_error","status_checked_at":"2026-01-26T13:55:26.068Z","response_time":59,"last_error":"SSL_read: 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":"2026-01-26T18:00:22.685Z","updated_at":"2026-01-26T18:00:45.894Z","avatar_url":"https://github.com/peter-mount.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# go-kernel - A service microkernel for golang applications.\n\ngo-kernel is a simple microkernel which can run multiple services within the same go runtime. The kernel provides both\nlifecycle\nsupport for those services and dependency management so that services start and stop in the correct order.\n\nEach service can declare any dependencies with other services which are then automatically injected\nat startup. This ensures that services are started in the correct order.\nIt also allows for code reuse without most of the required boilerplate code usually required.\n\nFull documentation is available online as [html](https://area51.dev/go/go-kernel/) as well\nas [pdf](https://area51.dev/static/book/go-kernel.pdf)\nhowever a brief overview is listed below.\n\n## Services\n\nA service is simply a struct which exposes functions to other services or performs some action during the applications'\nlifetime.\n\n    package myapp\n    \n    // An example service\n    type Example struct {\n        // Example of injecting another service as a dependency\n        Config *conf.Config `kernel:\"inject\"`\n        // Example of injecting a common task worker queue provided by the kernel\n        Worker task.Queue `kernel:\"worker\"`\n        // Example if declaring an indirect dependency\n        _ *PostCSS `kernel:\"inject\"`\n        // Example of creating a command line parameter\n        server *bool `kernel:\"flag,s,Run hugo in server mode\"`\n    }\n    \n    // Kernel lifecycle, this gets called during the start phase of the application\n    // This is optional, as are all of the life cycle functions.\n    func (s *MyService) Start() error {\n        return nil\n    }\n    \n    // Example of exposed function dependencies can use\n    func (s *MyService) Lookup( name string ) interface{} {\n        return nil\n    }\n\n## Bootstrap\n\nEvery application requires a simple bootstrap.\nThis bootstrap consists of a single call to `kernel.Launch()` providing one or more services that you want to start.\nThe kernel will then begin with these, injecting any dependencies required.\n\nThe order they are listed here will be used to determine which one starts first,\nalthough any dependencies within them will be deployed first and can override this sequence.\n\nThe following is an example from the code that generates [area51.dev](https://area51.dev/):\n\n    package main\n    \n    import (\n        \"github.com/peter-mount/documentation/tools/hugo\"\n        \"github.com/peter-mount/documentation/tools/pdf\"\n        \"github.com/peter-mount/go-kernel/v2\"\n        \"log\"\n    )\n    \n    func main() {\n        err := kernel.Launch(\n            \u0026hugo.Hugo{},\n            \u0026pdf.PDF{},\n        )\n        if err != nil {\n            log.Fatal(err)\n        }\n    }\n\nHere it defines two services which must be started. Each one is declared by passing an empty instance of the required\nService's to\nthe Launch method.\n\n## Lifecycle\n\nThis is documented fully in the main documentation, but the following table lists them in the order the kernel will call\nthem.\n\nAll of these are optional.\n\n| Seq | Lifecycle | Description                                                      | Example                                        |\n| --- |-----------|------------------------------------------------------------------|------------------------------------------------|\n| 1 | Inject    | Resolve dependencies                                             | field injection with `kernel:inject` tag       |\n| 2 | Init      | Declare command line flags                                       | func (s *Example) Init(k *kernel.Kernel) error |\n| 3 | PostInit  | Verify state is correct, e.g. check command line flags are valid | func (s *Example) PostInit() error             |\n| 4 | Start     | Starts the service, open any resources like Databases etc        | func (s *Service) Start() error                |\n| 5 | Run       | Run any tasks the service requires                               | func (s *Service) Run() error                  |\n| 6 | Stop      | Stops a service                                                  | func (s *Service) Stop()                       |\n\nAs the kernel runs through each lifecycle stage, if any method returns an error then the kernel will stop at that point.\nIf the failure occurs in the Start or Run stages then the Stop stage will be invoked ensuring that any services that\nhave been started at that point will be stopped.\n\n### Notes\n* The `Inject` and `Init` lifecycles are actually the same one but done in that order. I cannot show this in markdown for this page.\n* You must *NOT* create any external resources like opening files, databases etc. before the `Start` stage.\n* `Start()` is optional. If a service does not implement this function then it's marked as implicitly started.\n* `Run()` is deprecated for most purposes. If a service is to perform some task like scan a disk for files it should use the Task api with the worker queue.\n* `Stop()` is optional and, it is perfectly valid to implement `Stop()` without a corresponding `Start()` function.\nWhen a service has started (with or without a `Start()` function) it is marked as started so if it implements `Stop()` then that method will be called to clean up the service.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeter-mount%2Fgo-kernel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpeter-mount%2Fgo-kernel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeter-mount%2Fgo-kernel/lists"}