potency

package module
v0.0.0-...-94c8d38 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 5, 2026 License: Apache-2.0 Imports: 11 Imported by: 2

README

MOVED

This repository has moved to https://g.fc.run/patchy/potency


Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrConflict       = errors.New("conflict")
	ErrMismatch       = errors.New("idempotency mismatch")
	ErrBodyMismatch   = fmt.Errorf("request body mismatch: %w", ErrMismatch)
	ErrMethodMismatch = fmt.Errorf("HTTP method mismatch: %w", ErrMismatch)
	ErrURLMismatch    = fmt.Errorf("URL mismatch: %w", ErrMismatch)
	ErrHeaderMismatch = fmt.Errorf("Header mismatch: %w", ErrMismatch)
	ErrInvalidKey     = errors.New("invalid Idempotency-Key")
)

Functions

This section is empty.

Types

type Potency

type Potency struct {
	// contains filtered or unexported fields
}

func NewPotency

func NewPotency(handler http.Handler) *Potency

func (*Potency) NumCached

func (p *Potency) NumCached() int

func (*Potency) ServeHTTP

func (p *Potency) ServeHTTP(w http.ResponseWriter, r *http.Request)

func (*Potency) SetLifetime

func (p *Potency) SetLifetime(lifetime time.Duration)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL