memstore

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Overview

Package memstore provides an in-memory implementation of refresh.Store.

This implementation is the oracle for the storetest contract suite and serves as a unit-test double for services that depend on refresh.Store. It is NOT suitable for production — state is not persisted across restarts.

Data model: a single append-only slice of tokenRecord. Each Issue and each Rotate appends one record; rotated_at and revoked_at are one-way flips. Parent→child lineage is tracked via parentID (uuid.Nil for roots).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(policy refresh.Policy, clock clock.Clock, randReader io.Reader) (refresh.Store, error)

New constructs an in-memory refresh.Store.

Returns an error when clock is nil or when the Policy is invalid (see refresh.Policy.Validate). If randReader is nil, crypto/rand.Reader is used.

Types

This section is empty.

Jump to

Keyboard shortcuts

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