{"id":23901584,"url":"https://github.com/s2-streamstore/s2-sdk-go","last_synced_at":"2026-01-31T06:04:49.918Z","repository":{"id":270653293,"uuid":"908019329","full_name":"s2-streamstore/s2-sdk-go","owner":"s2-streamstore","description":"Go SDK for S2","archived":false,"fork":false,"pushed_at":"2025-03-26T08:51:20.000Z","size":249,"stargazers_count":6,"open_issues_count":3,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-03-26T09:39:58.332Z","etag":null,"topics":["go","golang","grpc","s2","sdk","serverless","store","stream","streaming"],"latest_commit_sha":null,"homepage":"https://s2.dev","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/s2-streamstore.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-24T22:17:59.000Z","updated_at":"2025-03-26T08:50:56.000Z","dependencies_parsed_at":"2025-02-04T14:25:16.821Z","dependency_job_id":"99f600e5-b3ca-44fd-bafd-de5ff9b11bdb","html_url":"https://github.com/s2-streamstore/s2-sdk-go","commit_stats":null,"previous_names":["s2-streamstore/s2-sdk-go"],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s2-streamstore%2Fs2-sdk-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s2-streamstore%2Fs2-sdk-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s2-streamstore%2Fs2-sdk-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s2-streamstore%2Fs2-sdk-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/s2-streamstore","download_url":"https://codeload.github.com/s2-streamstore/s2-sdk-go/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249085475,"owners_count":21210267,"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":["go","golang","grpc","s2","sdk","serverless","store","stream","streaming"],"created_at":"2025-01-04T21:50:49.443Z","updated_at":"2026-01-06T01:16:17.822Z","avatar_url":"https://github.com/s2-streamstore.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003cp\u003e\n    \u003c!-- Light mode logo --\u003e\n    \u003ca href=\"https://s2.dev#gh-light-mode-only\"\u003e\n      \u003cimg src=\"./assets/s2-black.png\" height=\"60\"\u003e\n    \u003c/a\u003e\n    \u003c!-- Dark mode logo --\u003e\n    \u003ca href=\"https://s2.dev#gh-dark-mode-only\"\u003e\n      \u003cimg src=\"./assets/s2-white.png\" height=\"60\"\u003e\n    \u003c/a\u003e\n  \u003c/p\u003e\n\n  \u003ch1\u003eGo SDK for S2\u003c/h1\u003e\n\n  \u003cp\u003e\n    \u003c!-- pkg.go.dev --\u003e\n    \u003ca href=\"https://pkg.go.dev/github.com/s2-streamstore/s2-sdk-go/s2\"\u003e\u003cimg src=\"https://pkg.go.dev/badge/github.com/s2-streamstore/s2-sdk-go/s2.svg\" /\u003e\u003c/a\u003e\n    \u003c!-- Discord (chat) --\u003e\n    \u003ca href=\"https://discord.gg/vTCs7kMkAf\"\u003e\u003cimg src=\"https://img.shields.io/discord/1209937852528599092?logo=discord\" /\u003e\u003c/a\u003e\n    \u003c!-- Github Actions (CI) --\u003e\n    \u003ca href=\"https://github.com/s2-streamstore/s2-sdk-go/actions?query=branch%3Amain++\"\u003e\u003cimg src=\"https://github.com/s2-streamstore/s2-sdk-go/actions/workflows/ci.yml/badge.svg\" /\u003e\u003c/a\u003e\n    \u003c!-- LICENSE --\u003e\n    \u003ca href=\"./LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/github/license/s2-streamstore/s2-sdk-go\" /\u003e\u003c/a\u003e\n  \u003c/p\u003e\n\u003c/div\u003e\n\nThe Go SDK provides ergonomic wrappers and utilities to interact with the\n[S2 API](https://s2.dev/docs).\n\n## Getting started\n\n1. Create a new Go project:\n   ```bash\n   mkdir s2-example\n   cd s2-example\n   go mod init example.com/s2-example\n   ```\n\n2. Add the SDK dependency:\n   ```bash\n   go get github.com/s2-streamstore/s2-sdk-go/s2@latest\n   ```\n\n3. Generate an authentication token by logging onto the web console at\n   [s2.dev](https://s2.dev/dashboard).\n\n4. Set the token as an environment variable:\n   ```bash\n   export S2_ACCESS_TOKEN=\"\u003cyour auth token\u003e\"\n   ```\n\n5. Create a simple program:\n   ```go\n   package main\n\n   import (\n       \"context\"\n       \"fmt\"\n       \"log\"\n       \"os\"\n\n       \"github.com/s2-streamstore/s2-sdk-go/s2\"\n   )\n\n   func main() {\n       client := s2.New(os.Getenv(\"S2_ACCESS_TOKEN\"), nil)\n\n       basins := client.Basins.Iter(context.Background(), nil)\n       for basins.Next() {\n           fmt.Printf(\"Basin: %s\\n\", basins.Value().Name)\n       }\n       if err := basins.Err(); err != nil {\n           log.Fatal(err)\n       }\n   }\n   ```\n\n   Run with `go run main.go`.\n\n## Examples\n\nThe [`examples/`](./examples) directory contains various examples:\n\n| Example | Description |\n|---------|-------------|\n| [`unary`](./examples/unary) | Simple append and read operations |\n| [`append_session`](./examples/append_session) | High-throughput streaming appends |\n| [`batched_append_session`](./examples/batched_append_session) | Batched appends |\n| [`read_session`](./examples/read_session) | Streaming reads with backpressure |\n| [`list_iter`](./examples/list_iter) | Iterating over basins, streams, and tokens |\n| [`access_tokens`](./examples/access_tokens) | Issuing and revoking access tokens |\n| [`starwars`](./examples/starwars) | Stream Star Wars ASCII animation through S2 |\n\nRun any example:\n```bash\n# edit the code to set an appropriate basin and stream\nexport S2_ACCESS_TOKEN=\"\u003cyour auth token\u003e\"\ngo run ./examples/unary\n```\n\n### Starwars\n\nFor a fun demo, try streaming the Star Wars ASCII animation through S2:\n\n```bash\n# edit the code to set an appropriate basin and stream\nexport S2_ACCESS_TOKEN=\"\u003cyour auth token\u003e\"\ngo run ./examples/starwars -basin \"\u003cbasin name\u003e\" -stream \"\u003cstream name\u003e\"\n```\n\n## SDK Docs and Reference\n\nHead over to [pkg.go.dev](https://pkg.go.dev/github.com/s2-streamstore/s2-sdk-go/s2)\nfor detailed documentation and package reference.\n\n## Feedback\n\nWe use [Github Issues](https://github.com/s2-streamstore/s2-sdk-go/issues) to\ntrack feature requests and issues with the SDK. If you wish to provide feedback,\nreport a bug or request a feature, feel free to open a Github issue.\n\n### Contributing\n\nDevelopers are welcome to submit Pull Requests on the repository. If there is\nno tracking issue for the bug or feature request corresponding to the PR, we\nencourage you to open one for discussion before submitting the PR.\n\n## Reach out to us\n\nJoin our [Discord](https://discord.gg/vTCs7kMkAf) server. We would love to hear\nfrom you.\n\nYou can also email us at [hi@s2.dev](mailto:hi@s2.dev).\n\n## License\n\nThis project is licensed under the [MIT License](./LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fs2-streamstore%2Fs2-sdk-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fs2-streamstore%2Fs2-sdk-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fs2-streamstore%2Fs2-sdk-go/lists"}