- Feature: Add
Middleware
type,WithMiddleware
andChainMiddleware
methods to packageconfig
, this allows clients to chain and add Middlewares to the transport layer of the HTTP client.
- Feature: Add method
WithCaptureHTTPRequest
to packageruntime
, which allows capture of HTTP requests for debugging purposes.
- Improvement: Update
ConfigureRegion
method to take into account global servers without a region variable
- Feature: Add configuration option that, for the key flow, enables a goroutine to be spawned that will refresh the access token when it's close to expiring
- Deprecation:
- Methods:
config.WithMaxRetries
config.WithWaitBetweenCalls
config.WithRetryTimeout
clients.NewRetryConfig
- Fields:
clients.KeyFlowConfig.ClientRetry
clients.TokenFlowConfig.ClientRetry
clients.NoAuthFlowConfig.ClientRetry
clients.RetryConfig
- Retry options were removed to reduce complexity of the clients. If this functionality is needed, you can provide your own custom HTTP client.
- Methods:
- Breaking Change: Change signature of
auth.NoAuth
, which no longer takesclients.RetryConfig
as argument. - Breaking Change:
- Methods:
clients.KeyFlow.Clone
clients.TokenFlow.Clone
clients.NoAuthFlow.Clone
clients.Do
- Fields:
clients.DefaultRetryMaxRetries
clients.DefaultRetryWaitBetweenCalls
clients.DefaultRetryTimeout
- Constants:
clients.ClientTimeoutErr
clients.ClientContextDeadlineErr
clients.ClientConnectionRefusedErr
clients.ClientEOFError
clients.Environment
- Removed to reduce complexity of the clients, they were no longer being used.
- Methods:
- Deprecation: Mark method
config.WithCaptureHTTPResponse
as deprecated, to avoid confusion due to it not being a configuration option. Useruntime.WithCaptureHTTPResponse
instead. - Deprecation: Mark method
config.WithJWKSEndpoint
and fieldconfig.Configuration.JWKSCustomUrl
as deprecated. Validation using JWKS was removed, for being redundant with token validation done in the APIs. These have no effect. - Breaking Change: Remove method
KeyFlow.Clone
, that was no longer being used.
- Feature: Add package
runtime
, which implements methods to be used when performing API requests. - Feature: Add method
WithCaptureHTTPResponse
to packageruntime
, which does the same asconfig.WithCaptureHTTPResponse
. Method was moved to avoid confusion due to it not being a configuration option, and will be removed in a later release.
- Bugfix: Use
http.Request
context inclients.Do
- Add LICENSE and NOTICE files
- Improvement: When using the key flow, the SDK will extract the private key from the service account key and use it, if no private key is provided in the configuration, through environment variable or in the credentials file. This makes it simpler to use the key flow: if you create a service account key including the private key, you don't need to provide the private key separately anymore
- Replace k8s.io/apimachinery with cenkalti/backoff
auth
: setup authentication, specifically using the service account key or token flows. Check our authentication exampleclients
: baseline http client implementations to support different use cases, such as the different authentication flowsconfig
: configuration for the SDK clients, such as custom endpoints, region and custom http client configuration. Check our configuration exampleoapierror
: open api error definition and handlingutils
: utilities, such as thePtr
method to return a pointer to a variable of any type, which can be useful for creating payloadswait
: functionality to wait until a specific async operation has finished. Check our waiter example