Versions in this module Expand all Collapse all v0 v0.2.0 Dec 1, 2025 v0.1.0 Feb 25, 2026 Changes in this version + var ErrCircuitBreakerOpen = fmt.Errorf("circuit breaker is open") + var ErrMaxRetriesExceeded = fmt.Errorf("maximum retries exceeded") + func WithJWTToken(ctx context.Context, token string) context.Context + type Bundle struct + func NewBundle(config Config) *Bundle + func (b *Bundle) Client() *Client + func (b *Bundle) Close() error + func (b *Bundle) EnableJWTIntegration(jwtBundle interface{}) error + func (b *Bundle) Initialize(app *framework.App) error + func (b *Bundle) Name() string + func (b *Bundle) Stop(ctx context.Context) error + type CircuitBreakerConfig struct + Interval time.Duration + MaxRequests uint32 + Name string + ReadyToTrip func(counts gobreaker.Counts) bool + Timeout time.Duration + type Client struct + func (c *Client) Delete(ctx context.Context, path string) error + func (c *Client) Get(ctx context.Context, path string, dest interface{}) error + func (c *Client) GetCircuitBreakerCounts() gobreaker.Counts + func (c *Client) GetCircuitBreakerState() gobreaker.State + func (c *Client) HealthCheck(ctx context.Context, healthURL string) error + func (c *Client) Post(ctx context.Context, path string, body interface{}, dest interface{}) error + func (c *Client) Put(ctx context.Context, path string, body interface{}, dest interface{}) error + func (c *Client) RawRequest(ctx context.Context, method, url string, headers map[string]string, ...) (*http.Response, error) + type Config struct + APIKeyHeader string + BaseURL string + CircuitBreakerConfig CircuitBreakerConfig + CredentialProvider CredentialProvider + EnableJWTAuth bool + EnableMetrics bool + EnableRequestLogging bool + ExpectContinueTimeout time.Duration + IdleConnTimeout time.Duration + LogRequestBody bool + LogResponseBody bool + MaxIdleConns int + MaxIdleConnsPerHost int + MaxLogBodySize int + RetryConfig RetryConfig + TLSConfig *tls.Config + TLSHandshakeTimeout time.Duration + Timeout time.Duration + UserAgent string + func DefaultConfig() Config + func (c *Config) Validate() error + type CredentialProvider interface + GetAPIKey func(ctx context.Context) (string, error) + GetJWTToken func(ctx context.Context) (string, error) + type HTTPError struct + Body string + Method string + Status string + StatusCode int + URL string + func (e *HTTPError) Error() string + func (e *HTTPError) IsRetryableError() bool + type RetryConfig struct + InitialInterval time.Duration + MaxInterval time.Duration + MaxRetries int + Multiplier float64 + RandomizationFactor float64 + type StaticCredentialProvider struct + func NewStaticCredentialProvider(apiKey, jwtToken string) *StaticCredentialProvider + func (p *StaticCredentialProvider) GetAPIKey(ctx context.Context) (string, error) + func (p *StaticCredentialProvider) GetJWTToken(ctx context.Context) (string, error)