{"id":16379860,"url":"https://github.com/robinbraemer/event","last_synced_at":"2025-10-26T10:30:52.498Z","repository":{"id":64297729,"uuid":"565159348","full_name":"robinbraemer/event","owner":"robinbraemer","description":"A stable Go event library to subscribe and fire events used to decouple the event source and sink in reactive add-on based systems. Generics supported!","archived":false,"fork":false,"pushed_at":"2024-11-27T13:09:07.000Z","size":13,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-07T02:48:35.903Z","etag":null,"topics":["event","golang","library","subscribe"],"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/robinbraemer.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":"2022-11-12T14:24:48.000Z","updated_at":"2024-11-27T13:09:04.000Z","dependencies_parsed_at":"2024-08-06T19:31:39.060Z","dependency_job_id":"9acfb7a0-9a14-43ff-a1e3-be62f725aa16","html_url":"https://github.com/robinbraemer/event","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robinbraemer%2Fevent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robinbraemer%2Fevent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robinbraemer%2Fevent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robinbraemer%2Fevent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/robinbraemer","download_url":"https://codeload.github.com/robinbraemer/event/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238310244,"owners_count":19450828,"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","golang","library","subscribe"],"created_at":"2024-10-11T03:49:49.911Z","updated_at":"2025-10-26T10:30:52.188Z","avatar_url":"https://github.com/robinbraemer.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# event\n\nGo event library to subscribe and fire events used to decouple the event\nsource and sink in complex or add-on based systems.\n\n```go\n// Custom event type\ntype MyEvent struct {\n    Message string\n}\n\n// Create a new event manager.\nmgr := New()\n\n// Subscribe to the event.\nSubscribe(mgr, 0, func(e *MyEvent) {\n    // Handle the event.\n    fmt.Println(\"handler A received event:\", e.Message)\n})\n\n// Subscribe to the event higher priority.\nSubscribe(mgr, 1, func(e *MyEvent) {\n    // Handle the event.\n    fmt.Println(\"handler B received event:\", e.Message)\n    e.Message = \"hello gophers\"\n})\n\nunsubscribe := Subscribe(mgr, 0, func(e *MyEvent) {\n    // Handle the event.\n    fmt.Println(\"handler C received event:\", e.Message)\n})\n// Unsubscribe from the event if you want to or ignore and never call it.\nunsubscribe()\n\n// Fire the event.\nmgr.Fire(\u0026MyEvent{Message: \"hello world\"})\n```\n\n## Used by\n\n- [Gate](https://github.com/minekube/gate)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobinbraemer%2Fevent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobinbraemer%2Fevent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobinbraemer%2Fevent/lists"}