{"id":36742664,"url":"https://github.com/artyomturkin/go-stream","last_synced_at":"2026-01-12T12:30:04.935Z","repository":{"id":57495657,"uuid":"177428071","full_name":"artyomturkin/go-stream","owner":"artyomturkin","description":"Common stream abstraction and in-memory implementation for streaming data","archived":false,"fork":false,"pushed_at":"2019-04-28T09:28:06.000Z","size":33,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-14T03:26:37.448Z","etag":null,"topics":["stream-processing","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/artyomturkin.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}},"created_at":"2019-03-24T14:46:54.000Z","updated_at":"2019-04-28T09:27:14.000Z","dependencies_parsed_at":"2022-08-28T19:51:20.991Z","dependency_job_id":null,"html_url":"https://github.com/artyomturkin/go-stream","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/artyomturkin/go-stream","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artyomturkin%2Fgo-stream","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artyomturkin%2Fgo-stream/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artyomturkin%2Fgo-stream/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artyomturkin%2Fgo-stream/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/artyomturkin","download_url":"https://codeload.github.com/artyomturkin/go-stream/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artyomturkin%2Fgo-stream/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28338977,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T12:22:26.515Z","status":"ssl_error","status_checked_at":"2026-01-12T12:22:10.856Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["stream-processing","streaming"],"created_at":"2026-01-12T12:30:04.237Z","updated_at":"2026-01-12T12:30:04.929Z","avatar_url":"https://github.com/artyomturkin.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Stream abstraction for Go\n\nCommon stream abstraction and in-memory implementation for streaming data.\n\nImporting into a project with `go get`\n```sh\ngo get github.com/artyomturkin/go-stream\n```\n\nImport into a project with `go mod` support by adding to `go.mod` file\n```\nrequire github.com/artyomturkin/go-stream v1.1.2\n```\n\n## Abstractions\n\n### Stream\nCommon structure and configuration for creating streams from providers, consumer and producer interfaces and message structure.\n\n```go\n// Stream used to build a Consumer object\ntype Stream interface {\n\tGetConsumer(ctx context.Context, group string) Consumer\n\tGetProducer(ctx context.Context, group string) Producer\n}\n```\n```go\n// Message wraps context and data from stream\ntype Message struct {\n\tContext context.Context\n\tData    interface{}\n}\n```\n```go\n// Consumer provides read access to a message stream\ntype Consumer interface {\n\tMessages() \u003c-chan Message\n\tAck(context.Context) error\n\tNack(context.Context) error\n\tClose() error\n\tErrors() \u003c-chan error\n\tDone() \u003c-chan struct{}\n}\n```\n```go\n// Producer provides publish access to a message stream\ntype Producer interface {\n\tPublish(context.Context, interface{}) error\n\tClose() error\n\tErrors() \u003c-chan error\n\tDone() \u003c-chan struct{}\n}\n```\n```go\n// Config common configuration for streams\ntype Config struct {\n\tEndpoints           []string\n\tTopic               string\n\tMaxInflightMessages int\n\tCustom              interface{}\n}\n```\n\n### Helper funcs\n\nFunctions to set and get tracking information from context\n```go\n// SetTrackers adds message trackers to context\nfunc SetTrackers(ctx context.Context, tracker ...interface{}) context.Context\n```\n```go\n// GetTrackers returns an array of trackers\nfunc GetTrackers(ctx context.Context) []interface{}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fartyomturkin%2Fgo-stream","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fartyomturkin%2Fgo-stream","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fartyomturkin%2Fgo-stream/lists"}