{"id":18446639,"url":"https://github.com/cristalhq/sse","last_synced_at":"2025-04-08T00:31:55.474Z","repository":{"id":57548358,"uuid":"220697043","full_name":"cristalhq/sse","owner":"cristalhq","description":"Server-Sent Events (SSE) library for Go","archived":false,"fork":false,"pushed_at":"2024-03-04T16:18:10.000Z","size":46,"stargazers_count":11,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-23T03:24:49.588Z","etag":null,"topics":["dependency-free","go","golang","server-sent-events","sse","streaming"],"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/cristalhq.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":"2019-11-09T20:02:54.000Z","updated_at":"2024-03-05T17:51:20.000Z","dependencies_parsed_at":"2023-12-17T11:31:58.669Z","dependency_job_id":"b0176f9b-1758-4f3d-afc8-5eeca812b70c","html_url":"https://github.com/cristalhq/sse","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/cristalhq%2Fsse","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cristalhq%2Fsse/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cristalhq%2Fsse/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cristalhq%2Fsse/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cristalhq","download_url":"https://codeload.github.com/cristalhq/sse/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247755400,"owners_count":20990616,"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":["dependency-free","go","golang","server-sent-events","sse","streaming"],"created_at":"2024-11-06T07:09:53.647Z","updated_at":"2025-04-08T00:31:55.164Z","avatar_url":"https://github.com/cristalhq.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sse\n\n[![build-img]][build-url]\n[![pkg-img]][pkg-url]\n[![reportcard-img]][reportcard-url]\n[![coverage-img]][coverage-url]\n\nServer-Sent Events (SSE) library for Go.\n\nSee https://www.w3.org/TR/eventsource for the technical specification.\n\n## Features\n\n* Simple API.\n* Performant.\n* Dependency-free.\n* Low-level API to build a server.\n\n## Install\n\nGo version 1.13\n\n```\ngo get github.com/cristalhq/sse\n```\n\n## Example\n\nAs a simple HTTP handler:\n```go\nhttp.HandleFunc(\"/sse\", func(w http.ResponseWriter, r *http.Request) {\n    stream, err := sse.UpgradeHTTP(r, w)\n    if err != nil {\n        http.Error(w, err.Error(), http.StatusBadRequest)\n        return\n    }\n\n    data := struct {\n        Text string `json:\"text\"`\n    }{\n        Text: \"hey there\",\n    }\n    stream.WriteJSON(\"123\", \"msg\", data)\n})\n```\n\nSee [example_test.go](https://github.com/cristalhq/sse/blob/master/example_test.go) for more.\n\n## Documentation\n\nSee [these docs][pkg-url].\n\n## License\n\n[MIT License](LICENSE).\n\n[build-img]: https://github.com/cristalhq/sse/workflows/build/badge.svg\n[build-url]: https://github.com/cristalhq/sse/actions\n[pkg-img]: https://pkg.go.dev/badge/cristalhq/sse\n[pkg-url]: https://pkg.go.dev/github.com/cristalhq/sse\n[reportcard-img]: https://goreportcard.com/badge/cristalhq/sse\n[reportcard-url]: https://goreportcard.com/report/cristalhq/sse\n[coverage-img]: https://codecov.io/gh/cristalhq/sse/branch/master/graph/badge.svg\n[coverage-url]: https://codecov.io/gh/cristalhq/sse\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcristalhq%2Fsse","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcristalhq%2Fsse","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcristalhq%2Fsse/lists"}