temporalio / sdk-go

Temporal Go SDK
https://docs.temporal.io/application-development?lang=go
MIT License
538 stars 213 forks source link

Consider potential range-over-func APIs #1593

Open Quinn-With-Two-Ns opened 2 months ago

Quinn-With-Two-Ns commented 2 months ago

Is your feature request related to a problem? Please describe. With Go 1.23 range-over-func was brought into the language allowing the implementation of iterator like patterns

Describe the solution you'd like Consider what APIs we can add to the Go SDK to take advantage of range-over-func

Additional context https://go.dev/wiki/RangefuncExperiment

Quinn-With-Two-Ns commented 2 months ago

Possible APIS

Workflow

Client

cretz commented 2 months ago

The main place (async) iterators are used in other SDKs is listing workflows, listing schedules, and iterating history events. So would add "iterating history events" to your list.