Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrSeenBefore = errors.New("X-Idempotency-Key seen before")
)
Functions ¶
func FromRequest ¶
FromRequest extracts the idempotency key from HTTP headers and records its presence in the provided Recorder.
A nil Recorder will always return idempotency keys as unseen.
func SeenBefore ¶
func SeenBefore(w http.ResponseWriter)
SeenBefore sets a HTTP response code as an error for previously seen idempotency keys.
Types ¶
Click to show internal directories.
Click to hide internal directories.