shredbx logo
shredbx shredbx shredbx shredbx Personal
  • Home
  • Lab
  • Portfolio
  • Experience
  • Services
  • Profile
  • Contact
AClaude
  • Home
  • Lab
  • Portfolio
  • Experience
  • Services
  • Profile
  • Contact
Andrei Solovev
Packages
Search packages... ⌘K
  • Data & Persistence
    • Databases 3
    • Object Storage 1
    • File Formats 2
    • Enumerations 2
    • Content 1
    • Codegen 2
  • System Integration
    • Secrets 1
    • CLI Tools 5
    • Media Processing 2
    • Adapters 2
  • UI & Components
    • Primitives 1
    • Blocks 1
    • Sections & Layouts 1
    • Entities 1
    • Media 1
    • Utilities 1
    • State & Presenter 1
    • Branding & Style 1
  • Game Engine
    • Framework 1
    • Engine 2
    • Presets 1
    • Vendor 1
Packages/ System Integration/ Adapters/ Adapter
Go Package

adapter

HTTP client adapter — standardized external API client with retry and auth

Go Ready SI
Adapter Configuration go
1
2
3
4
5
6
7
8
9
10
11
12
13
dokploy := adapter.NewAdapter("dokploy", "https://deploy.example.com/api",
    adapter.WithAuth("Bearer", apiToken),
    adapter.WithRetry(3, 500*time.Millisecond),
    adapter.WithTimeout(30*time.Second),
)

// All requests inherit retry, auth, and timeout
resp, err := dokploy.Request(ctx, "POST", "/application/deploy", payload)
if err != nil {
    // Typed error: *adapter.RetryExhaustedError, *adapter.TimeoutError
    return fmt.Errorf("deploy failed: %w", err)
}
// resp.StatusCode, resp.Body, resp.Duration

About

Provides a standardized HTTP client wrapper for external API integrations. Handles automatic retry with exponential backoff, authentication header injection, request/response logging, and timeout enforcement.

Public API

NameKindSignature
Adaptertypetype Adapter struct
NewAdapterfuncfunc NewAdapter(name string, baseURL string, opts ...Option) *Adapter
Requestfuncfunc (a *Adapter) Request(ctx context.Context, method, path string, body any) (*Response, error)
WithRetryfuncfunc WithRetry(maxAttempts int, backoff time.Duration) Option
WithAuthfuncfunc WithAuth(scheme string, credential string) Option

Dependencies

Imports (2)

config Go Ready

YAML configuration reader — typed config loading with environment overlay

yamlconfigurationenvironmenttyped-config
4 exports 4 deps
vault Go Ready

1Password vault adapter — credential retrieval, caching, op:// URI resolution

1passwordsecretscredentialsop-uri
5 exports 4 deps

Imported By (1)

clientregistry Go Ready

Client registry — centralized HTTP client pool with per-service configuration

client-poolservice-registrycentralizedconfiguration
4 exports 2 deps

Related Packages

clientregistry Go Ready

Client registry — centralized HTTP client pool with per-service configuration

client-poolservice-registrycentralizedconfiguration
4 exports 2 deps
vault Go Ready

1Password vault adapter — credential retrieval, caching, op:// URI resolution

1passwordsecretscredentialsop-uri
5 exports 4 deps

Source

github.com/shredbx/sbx-core/pkg/adapter
http-clientretryauthenticationexternal-api
shredbx logo shredbx shredbx shredbx shredbx Andrei Solovev

Solution Architect & Lead Software Engineer

ExperiencePortfolioResearch & ExperimentsEducationCertificationSkills
GitHub ↗LinkedIn ↗Email ↗
AVAILABLE FOR NEW PROJECTS
// MY LATEST BEATS
Hobby & Interests

Lab

  • The Lab
  • Framework
  • Components
  • Packages
  • Games
  • Process (SDLC)
  • Knowledge
  • Blog

Andrei

  • Portfolio
  • Experience
  • Services
  • Profile
  • Contact
  • Lifestyle

Team

  • Team
  • Andrei
  • Claude

Legal

  • Privacy
  • Terms
  • Cookies
© 2026 shredbx.com. All rights reserved. — Andrei Solovev |