ワンクリックで
goyacodedevutils-yabackoff
Simple exponential back-off strategy for retry loops. Use instead of a hand-rolled sleep-and-double retry loop.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Simple exponential back-off strategy for retry loops. Use instead of a hand-rolled sleep-and-double retry loop.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Index of every GoYaCodeDevUtils utility package (config, errors, logging, caching, rate limiting, backoff, hashing, gzip, RSA, feature flags, FSM, thread-safe collections, locales, Telegram bot stack) with a pointer to each package's own skill. Use before hand-rolling infrastructure code GoYaCodeDevUtils may already provide.
High-level Telegram bot framework on top of gotd/td - router/dispatcher with filters and middleware, FSM-aware routing, per-user localization, sequential-update scheduling, and a message-send queue. Use as the starting point for any Telegram bot.
Thin wrapper around gotd/td's telegram.Client adding background-connect-with-retry, bot-token authorization, updates.Manager wiring, and SOCKS5/MTProto proxy helpers. Use for direct low-level Telegram client control instead of raw gotd/td.
Redis-backed persistence for gotd/td's updates.Manager state (pts/qts/seq/date via RedisJSON) plus channel/user access-hash bookkeeping, and a GORM/AES-encrypted session-storage layer. Use for any yatgclient/yatgbot state or session persistence.
Generic pluggable key-value cache abstraction with interchangeable in-memory and Redis backends, hash-oriented API. Use for any caching/session-store need instead of hand-rolling a map or a bare redis.Client call.
Loads JSON locale files into a nested key-tree with lookup, {placeholder} formatting, JSON serving, language-tag normalization, and Go-struct codegen. Use for any i18n/localization instead of hand-rolled JSON locale loading.
| name | goyacodedevutils-yabackoff |
| description | Simple exponential back-off strategy for retry loops. Use instead of a hand-rolled sleep-and-double retry loop. |
Import path: github.com/YaCodeDev/GoYaCodeDevUtils/yabackoff.
Exponential back-off strategy for retry loops.
Backoff interface — Next() time.Duration, Current() time.Duration, Wait(), Reset().Exponential struct (implements Backoff); NewExponential(initialInterval, multiplier, maxInterval, resetAfter time.Duration) Exponential.const DefaultInitialInterval = 500ms, DefaultMultiplier = 1.5, DefaultMaxInterval = 60s.Exponential is usable: missing/zero constructor args are lazily replaced with the package defaults on first Next()/Current() call.resetAfter (4th constructor arg): if the time since the last Next() call exceeds it, the interval auto-resets to the initial value; pass 0 to disable auto-reset.yatgclient for reconnect backoff.BackoffModule (fx.go) provides a Backoff from a supplied ExponentialParams.