FusionAuth / fusionauth-client-builder

The FusionAuth client library builder
https://fusionauth.io/
Apache License 2.0
6 stars 24 forks source link

Update generated Go client to accept Context #50

Closed Zac300 closed 1 year ago

Zac300 commented 1 year ago

Updates generated Go client to allow context.Context to optionally be provided by overloading functions to have WithContext equivalent with context.Context as the first parameter. Context has been added following Go's recommendation to not store Contexts inside a struct type; instead, pass a Context explicitly to each function that needs it. The Context should be the first parameter, typically named ctx.

By allowing Context to be provided this allows caller many improvements, such as the ability to cancel requests and include outbound FusionAuth API requests in OpenTelemetery distributed tracing just to name a few.

robotdan commented 1 year ago

@mmanes is this something you can review?

robotdan commented 1 year ago

Thanks @mmanes and @Zac300 !!

robotdan commented 1 year ago

Related commit