Versions in this module Expand all Collapse all v2 v2.0.1 Feb 2, 2026 Changes in this version + func DefaultHash(r *http.Request, body []byte) (string, error) + type HashFunc func(*http.Request, []byte) (string, error) + type KeyFunc func(*http.Request) string + type Middleware struct + func New(opts Options) (*Middleware, error) + func (m *Middleware) Handler(next http.Handler) http.Handler + func (m *Middleware) Middleware() func(http.Handler) http.Handler + type Options struct + Clock ports.Clock + FailOpen bool + HashFunc HashFunc + HeaderName string + InFlightTTL time.Duration + KeyFunc KeyFunc + MaxBodyBytes int64 + OnError func(error) + ReplayHeaderName string + ResponseHeaderAllow []string + ResponseHeaderDeny []string + ShouldHandle func(*http.Request) bool + ShouldStore func(status int) bool + Store ports.IdempotencyStore + TTL time.Duration