Versions in this module Expand all Collapse all v0 v0.1.0 Feb 10, 2026 Changes in this version + func Backoff(attempt int, base, maxBackoff time.Duration, jitter *JitterSource) time.Duration + type Engine struct + func New(store storage.Store, tg *telegram.Client, tmplRenderer tmpl.Renderer, ...) *Engine + func (e *Engine) PauseCampaign(ctx context.Context, id string) error + func (e *Engine) SetJitterSource(j *JitterSource) + func (e *Engine) Shutdown(ctx context.Context) error + func (e *Engine) Start(ctx context.Context) error + func (e *Engine) StartCampaign(ctx context.Context, id string) error + func (e *Engine) Stop() + type JitterSource struct + func NewJitterSource() *JitterSource + func NewSeededJitterSource(seed1, seed2 uint64) *JitterSource + type RateLimiter struct + func NewRateLimiter(globalRPS, perChatRPS float64) *RateLimiter + func (rl *RateLimiter) ChatCount() int64 + func (rl *RateLimiter) Evict(ttl time.Duration) + func (rl *RateLimiter) Restore(originalRPS float64) + func (rl *RateLimiter) Throttle(newRPS float64) + func (rl *RateLimiter) WaitChat(ctx context.Context, chatID int64) error + func (rl *RateLimiter) WaitGlobal(ctx context.Context) error