{"id":13412652,"url":"https://github.com/temporalio/sdk-go","last_synced_at":"2026-01-12T09:56:17.149Z","repository":{"id":37250440,"uuid":"215838955","full_name":"temporalio/sdk-go","owner":"temporalio","description":"Temporal Go SDK","archived":false,"fork":false,"pushed_at":"2025-05-08T19:03:54.000Z","size":16475,"stargazers_count":625,"open_issues_count":199,"forks_count":239,"subscribers_count":18,"default_branch":"master","last_synced_at":"2025-05-11T14:43:37.334Z","etag":null,"topics":["golang","open-source","sdk-go","service-bus","workflow-automation","workflow-engine","workflow-management-system"],"latest_commit_sha":null,"homepage":"https://docs.temporal.io/application-development?lang=go","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/temporalio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-10-17T16:34:57.000Z","updated_at":"2025-05-10T09:50:59.000Z","dependencies_parsed_at":"2023-09-26T04:06:52.666Z","dependency_job_id":"53047fee-d590-477c-8e8a-5193889b0f22","html_url":"https://github.com/temporalio/sdk-go","commit_stats":{"total_commits":1517,"total_committers":166,"mean_commits":9.13855421686747,"dds":0.8707976268951878,"last_synced_commit":"9d74a905fc3602dfa9dddf114087c43a1b64e6b8"},"previous_names":["temporalio/temporal-go-client","temporalio/temporal-go-sdk","temporalio/go-sdk"],"tags_count":129,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/temporalio%2Fsdk-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/temporalio%2Fsdk-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/temporalio%2Fsdk-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/temporalio%2Fsdk-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/temporalio","download_url":"https://codeload.github.com/temporalio/sdk-go/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253853407,"owners_count":21974105,"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":["golang","open-source","sdk-go","service-bus","workflow-automation","workflow-engine","workflow-management-system"],"created_at":"2024-07-30T20:01:27.329Z","updated_at":"2026-01-12T09:56:17.143Z","avatar_url":"https://github.com/temporalio.png","language":"Go","funding_links":[],"categories":["Go","分布式系统","Distributed Systems"],"sub_categories":["Using Temporal","检索及分析资料库","Search and Analytic Databases"],"readme":"# Temporal Go SDK [![Build Status](https://github.com/temporalio/sdk-go/actions/workflows/ci.yml/badge.svg?event=push)](https://github.com/temporalio/sdk-go/actions/workflows/ci.yml) [![PkgGoDev](https://pkg.go.dev/badge/go.temporal.io/sdk)](https://pkg.go.dev/go.temporal.io/sdk)\n\n[Temporal](https://github.com/temporalio/temporal) is a distributed, scalable, durable, and highly available orchestration engine used to execute asynchronous long-running business logic in a scalable and resilient way.\n\n\"Temporal Go SDK\" is Temporal's framework for authoring workflows and activities using the Go language.\n\n## How to use\n\nClone this repo into the preferred location.\n\n```bash\ngit clone https://github.com/temporalio/sdk-go.git\n```\n\nSee [samples](https://github.com/temporalio/samples-go) to get started.\n\nDocumentation is available [here](https://docs.temporal.io).\nYou can also find the API documentation [here](https://pkg.go.dev/go.temporal.io/sdk).\n\n## Using slog\n\nIf using Go version 1.21+ the Go SDK provides built in integration with the standard [slog](https://pkg.go.dev/log) package.\n\n\n```go\npackage main\nimport (\n\t\"log/slog\"\n\t\"os\"\n\n\t\"go.temporal.io/sdk/client\"\n\t\"go.temporal.io/sdk/log\"\n\t\"go.temporal.io/sdk/worker\"\n)\n\nfunc main() {\n\tclientOptions := client.Options{\n\t\tLogger: log.NewStructuredLogger(\n\t\t\tslog.New(slog.NewJSONHandler(os.Stdout, \u0026slog.HandlerOptions{\n\t\t\t\tAddSource: true,\n\t\t\t\tLevel:     slog.LevelDebug,\n\t\t\t}))),\n\t}\n\ttemporalClient, err := client.Dial(clientOptions)\n\t// ...\n}\n```\n\n## Workflow determinism checker\n\nSee [contrib/tools/workflowcheck](contrib/tools/workflowcheck) for a tool to detect non-determinism in Workflow Definitions.\n\n## Contributing\nWe'd love your help in making the Temporal Go SDK great. Please review our [contribution guidelines](CONTRIBUTING.md).\n\n## Go SDK upgrading past v1.25.1\n\nGo SDK version v1.26.0 switched from using https://github.com/gogo/protobuf to https://github.com/golang/protobuf. While this migration is mostly internal there are a few user visible changes to be aware of:\n\n### Change in types\n\n* `time.Time` in proto structs will now be [timestamppb.Timestamp](https://pkg.go.dev/google.golang.org/protobuf@v1.31.0/types/known/timestamppb#section-documentation)\n* `time.Duration` will now be [durationpb.Duration](https://pkg.go.dev/google.golang.org/protobuf/types/known/durationpb)\n* V2-generated structs embed locks, so you cannot dereference them.\n\n### Incompatible proto/json encoding\n\nProto enums will, when formatted to JSON, now be in SCREAMING_SNAKE_CASE rather than PascalCase.\n    * If trying to deserialize old JSON with PascalCase to proto use [go.temporal.io/api/temporalproto](https://pkg.go.dev/go.temporal.io/api/temporalproto).\n\nIf users used Temporal proto types in their Workflows, such as for activity output, users may need to modify the default data converter to handle these payloads.\n``` go\n\tconverter.NewProtoJSONPayloadConverterWithOptions(converter.ProtoJSONPayloadConverterOptions{\n\t\tLegacyTemporalProtoCompat: true,\n\t}),\n```\n\nWhile upgrading from Go SDK version `\u003c 1.26.0` to a version `\u003e= 1.26.0` users may want to also bias towards using\nproto binary to avoid any potential incompatibilities due to having clients serialize messages with incompatible `proto/json` format.\n\nOn clients running Go SDK `\u003c 1.26.0`\n``` go\nconverter.NewCompositeDataConverter(\n\t\tconverter.NewNilPayloadConverter(),\n\t\tconverter.NewByteSlicePayloadConverter(),\n\t\tconverter.NewProtoPayloadConverter(),\n\t\tconverter.NewProtoJSONPayloadConverterWithOptions(),\n\t\tconverter.NewJSONPayloadConverter(),\n\t)\n```\n\nOn clients running Go SDK `\u003e= 1.26.0`\n\n``` go\nconverter.NewCompositeDataConverter(\n\t\tconverter.NewNilPayloadConverter(),\n\t\tconverter.NewByteSlicePayloadConverter(),\n\t\tconverter.NewProtoPayloadConverter(),\n\t\tconverter.NewProtoJSONPayloadConverterWithOptions(converter.ProtoJSONPayloadConverterOptions{\n\t\t\tLegacyTemporalProtoCompat: true,\n\t\t}),\n\t\tconverter.NewJSONPayloadConverter(),\n\t)\n```\n\nNote: Payloads encoded with `proto/binary` will not be readable in the Temporal web UI.\n\n## License\nMIT License, please see [LICENSE](LICENSE) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftemporalio%2Fsdk-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftemporalio%2Fsdk-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftemporalio%2Fsdk-go/lists"}