-
Notifications
You must be signed in to change notification settings - Fork 1
Why Safe Defaults
福狼 edited this page May 13, 2026
·
1 revision
WithSafeDefaults() exists because external API clients should not start with aggressive behavior.
WithSafeDefaults() applies a conservative profile:
retry = 2
rate limit = 3 requests/second
burst = 3
A new SDK user may not immediately know:
- how often their code calls Steam APIs
- whether calls happen concurrently
- whether the service retries on failure
- whether the deployment has multiple instances
- whether the same API key is shared by other jobs
Safe defaults reduce accidental abuse and make first usage more stable.
Use it for:
- examples
- small services
- CLI tools
- early integration
- tests that touch real external endpoints
client, err := steam.NewClient(
steam.WithSafeDefaults(),
)Override it when you have:
- a queue
- metrics
- production traffic estimates
- explicit concurrency controls
- service-level rate budgets
client, err := steam.NewClient(
steam.WithRetry(2),
steam.WithRateLimiter(rate.Limit(10), 10),
)The SDK should make the safe path easy, while still allowing advanced users to tune behavior precisely.
____ ____ ____ _ _ ____ ____ _ _ / ____ ___ ____ ____ _ _ ____ ____
| __ | | |___ | | |__/ |__/ \_/ / [__ | |___ |__| |\/| __ | __ | |
|__] |__| | |__| | \ | \ | / ___] | |___ | | | | |__] |__|
- SteamID Model
- Steam Web API Notes
- Public Store Page Access Notes
- Partner API Notes
- OpenID Notes
- A2S Notes
- Steam Keys and Access Tokens
- Steam Static Assets
- Steam VDF and addons/vdf
- Steam Web API 特性说明
- 公开商店页面访问说明
- Partner API 说明
- OpenID 说明
- A2S 说明
- Steam Key 与 Access Token
- Steam 静态资源
- Steam VDF 与 addons/vdf