WithServerURL allows providing an alternative server URL.
operations.WithServerURL("http://api.example.com")
WithTemplatedServerURL allows providing an alternative server URL with templated parameters.
operations.WithTemplatedServerURL("http://{host}:{port}", map[string]string{
"host": "api.example.com",
"port": "8080",
})
WithRetries allows customizing the default retry configuration. Only usable with methods that mention they support retries.
operations.WithRetries(retry.Config{
Strategy: "backoff",
Backoff: retry.BackoffStrategy{
InitialInterval: 500 * time.Millisecond,
MaxInterval: 60 * time.Second,
Exponent: 1.5,
MaxElapsedTime: 5 * time.Minute,
},
RetryConnectionErrors: true,
})