{"id":44087611,"url":"https://github.com/open-component-model/pkg","last_synced_at":"2026-02-08T10:34:58.415Z","repository":{"id":212644235,"uuid":"731138110","full_name":"open-component-model/pkg","owner":"open-component-model","description":"Common functionality for open-component-model repositories","archived":false,"fork":false,"pushed_at":"2025-02-20T10:34:21.000Z","size":37,"stargazers_count":0,"open_issues_count":2,"forks_count":1,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-02-20T10:34:46.916Z","etag":null,"topics":["ocm","open-component-model"],"latest_commit_sha":null,"homepage":"","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/open-component-model.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":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-12-13T12:45:12.000Z","updated_at":"2025-02-20T10:34:25.000Z","dependencies_parsed_at":"2025-02-20T10:38:59.670Z","dependency_job_id":null,"html_url":"https://github.com/open-component-model/pkg","commit_stats":null,"previous_names":["open-component-model/pkg"],"tags_count":2,"template":false,"template_full_name":"open-component-model/repository-template","purl":"pkg:github/open-component-model/pkg","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/open-component-model%2Fpkg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/open-component-model%2Fpkg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/open-component-model%2Fpkg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/open-component-model%2Fpkg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/open-component-model","download_url":"https://codeload.github.com/open-component-model/pkg/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/open-component-model%2Fpkg/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29227789,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-08T09:43:19.170Z","status":"ssl_error","status_checked_at":"2026-02-08T09:42:55.556Z","response_time":57,"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":["ocm","open-component-model"],"created_at":"2026-02-08T10:34:57.748Z","updated_at":"2026-02-08T10:34:58.410Z","avatar_url":"https://github.com/open-component-model.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# open-component-model common `pkg`\n\nThis repository contains a collection of standard functionality to share amongst open-component-model repositories.\n\n## Metrics\n\n[metrics](./metrics) pkg contains a set of `MustRegister*` functions for registering Prometheus metrics.\n\nThe following is an example of usage for some gauges.\n\nFirst, declare the metric for the controller under `metrics` package like this:\n\n```go\n// ComponentVersionReconciledTotal counts the number times a component version was reconciled.\n// [component, version].\nvar ComponentVersionReconciledTotal = mh.MustRegisterCounterVec(\n\t\"ocm_system\",\n\tmetricsComponent,\n\t\"component_version_reconciled_total\",\n\t\"Number of times a component version was reconciled\",\n\t\"component\", \"version\",\n)\n```\n\nNotice, that the comment contains the parameters this metric needs in square brackets.\n\nTo use it in code, call:\n\n```go\nmetrics.ComponentVersionReconciledTotal.WithLabelValues(cv.GetName(), cv.GetVersion()).Inc()\n```\n\nThe `WithLabelValues` will correctly align the name and the version parameters. It will _panic_ if the values are\nmisaligned or not given correctly.\n\nCertain constants are also defined in order to make all metrics uniform across the controllers.\n\n## Support, Feedback, Contributing\n\nThis project is open to feature requests/suggestions, bug reports etc. via [GitHub issues](https://github.com/SAP/pkg/issues). Contribution and feedback are encouraged and always welcome. For more information about how to contribute, the project structure, as well as additional contribution information, see our [Contribution Guidelines](CONTRIBUTING.md).\n\n## Code of Conduct\n\nWe as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone. By participating in this project, you agree to abide by its [Code of Conduct](CODE_OF_CONDUCT.md) at all times.\n\n## Licensing\n\nCopyright (2024-) SAP SE or an SAP affiliate company and pkg contributors. Please see our [LICENSE](LICENSE) for copyright and license information. Detailed information, including third-party components and their licensing/copyright information, is available [via the REUSE tool](https://api.reuse.software/info/github.com/SAP/pkg).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopen-component-model%2Fpkg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopen-component-model%2Fpkg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopen-component-model%2Fpkg/lists"}