Documentation
¶
Overview ¶
Package idempotency provides idempotency utilities.
Index ¶
- type MemoryStore
- func (m *MemoryStore) Get(ctx context.Context, key string) (ports.IdempotencyRecord, bool, error)
- func (m *MemoryStore) Save(ctx context.Context, key string, record ports.IdempotencyRecord, ...) error
- func (m *MemoryStore) TryBegin(ctx context.Context, key string, record ports.IdempotencyRecord, ...) (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MemoryStore ¶
type MemoryStore struct {
// contains filtered or unexported fields
}
MemoryStore is an in-memory idempotency store intended for development/testing.
func NewMemoryStore ¶
func NewMemoryStore() *MemoryStore
NewMemoryStore constructs an in-memory idempotency store.
func (*MemoryStore) Get ¶
func (m *MemoryStore) Get(ctx context.Context, key string) (ports.IdempotencyRecord, bool, error)
Get returns an idempotency record if present and not expired.
Click to show internal directories.
Click to hide internal directories.