Skip to content

v1.3.0

Choose a tag to compare

@repenguin22 repenguin22 released this 11 Jul 08:56

Additive API only — no behavior change for existing code; construction
allocation grows one size class (ROADMAP §5).

  • Added (*Error).WithRetryDelay(d) and LookupRetryDelay(err) — the
    fourth client-visible channel, carrying a per-error dynamic retry
    delay (a rate limiter's actual time to the next token) that
    grpcerr.ToStatus emits as the RetryInfo detail, beating the static
    registry delay (RetryAfter). Outermost delay wins; blocked below a
    WithoutPublic barrier; excluded from LogValue; shown as %+v's new
    public.retry: line. A non-positive delay is a no-op — the input is a
    computed value and "retry after zero" carries no recommendation
    (deliberately not a panic, unlike registration-time RetryAfter). The
    "exactly three channels" contract wording moves to four across the docs.
    problem deliberately still emits no Retry-After header — the README
    shows the two-line handler pattern via LookupRetryDelay.
  • Changed The Error struct grew by the delay field: construction is
    now 160 B (was 144 B), still ~200ns / 1 alloc. README benchmarks updated.