{"id":16513899,"url":"https://github.com/twin/kevent","last_synced_at":"2025-10-28T04:32:29.938Z","repository":{"id":64298072,"uuid":"565613749","full_name":"TwiN/kevent","owner":"TwiN","description":"Simple library for creating Kubernetes events ","archived":false,"fork":false,"pushed_at":"2025-01-17T01:58:36.000Z","size":82,"stargazers_count":6,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-01T11:34:43.948Z","etag":null,"topics":["event","events","kubernetes","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/TwiN.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},"funding":{"github":["TwiN"]}},"created_at":"2022-11-13T23:45:03.000Z","updated_at":"2025-01-17T01:57:32.000Z","dependencies_parsed_at":"2023-02-11T23:25:11.021Z","dependency_job_id":"8e1d2688-3623-4155-811c-93dafdf9a77b","html_url":"https://github.com/TwiN/kevent","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TwiN%2Fkevent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TwiN%2Fkevent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TwiN%2Fkevent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TwiN%2Fkevent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TwiN","download_url":"https://codeload.github.com/TwiN/kevent/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238597386,"owners_count":19498396,"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":["event","events","kubernetes","library"],"created_at":"2024-10-11T16:10:47.071Z","updated_at":"2025-10-28T04:32:24.578Z","avatar_url":"https://github.com/TwiN.png","language":"Go","funding_links":["https://github.com/sponsors/TwiN"],"categories":[],"sub_categories":[],"readme":"# kevent\n![test](https://github.com/TwiN/kevent/actions/workflows/test.yml/badge.svg)\n[![Go Reference](https://pkg.go.dev/badge/github.com/TwiN/kevent.svg)](https://pkg.go.dev/github.com/TwiN/kevent)\n\nVery simple library for creating Kubernetes events.\n\n```go\neventManager := kevent.NewEventManager(kubernetesClient, applicationName)\neventManager.Create(resourceNamespace, resourceKind, resourceName, reason, message, isWarning)\n```\nWhere:\n- `applicationName` is the name of the application that creates the event.\n- `kubernetesClient` is a Kubernetes client (e.g. `kubernetes.Clientset`). Note that for testing purposes, the actual parameter type is kubernetes.Interface, which `kubernetes.Clientset` implements.\n- `resourceNamespace` is the namespace of the resource that the event is related to.\n- `resourceKind` is the kind of the resource that the event is related to.\n- `resourceName` is the name of the resource that the event is related to.\n- `reason` is the reason for the event (e.g. `FailedToCreate`, `Scheduled`, `FailedToSchedule`, etc.).\n- `message` is the message for the event.\n- `isWarning` is a boolean indicating whether the event is of type `Warning` or `Normal`.\n\nExample:\n```go\npackage main\n\nimport (\n    \"github.com/TwiN/kevent\"\n    \"k8s.io/client-go/kubernetes\"\n    \"k8s.io/client-go/rest\"\n)\n\nfunc main() {\n    clientConfig, _ := rest.InClusterConfig()\n    kubernetesClient, _ := kubernetes.NewForConfig(clientConfig)\n    eventManager := kevent.NewEventManager(kubernetesClient, \"your-application-name\")\n    eventManager.Create(\"kube-system\", \"pod\", \"nginx\", \"Deleted\", \"Application was unstable\", true)\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftwin%2Fkevent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftwin%2Fkevent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftwin%2Fkevent/lists"}