Help us shape the future of Go! Take the 2026 Go Developer Survey

idempotency

package
v0.0.0-...-4a71700 Latest Latest
Warning

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

Go to latest
Published: May 23, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(cache Cache) hypergon.Middleware

New creates the idempotency middleware.

Types

type Cache

type Cache interface {
	Get(ctx context.Context, key string) (string, error)
	SetNx(ctx context.Context, key string, value any, expiry time.Duration) error
}

Cache is the caching service interface.

Jump to

Keyboard shortcuts

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