|
|
90c48d9323
|
Implement Client struct with functional options
Add client.go with:
- Client struct with baseURL, username, remoteKey, token, tokenExp,
httpClient, retryConf, logger, and sync.RWMutex for thread safety
- NewClient constructor accepting username, remoteKey, and variadic options
- Default values: 30s timeout, Checkvist base URL
Add options.go with:
- RetryConfig struct (MaxRetries, BaseDelay, MaxDelay, Jitter)
- DefaultRetryConfig() with 3 retries, 1s base, 30s max, jitter enabled
- Option type for functional options pattern
- WithHTTPClient, WithTimeout, WithRetryConfig, WithLogger, WithBaseURL
Closes checkvist-api-ymg
|
2026-01-14 13:25:03 +01:00 |
|