Versions in this module Expand all Collapse all v0 v0.1.1 Oct 23, 2026 v0.1.0 Oct 23, 2026 Changes in this version + type MemoryStore struct + func NewMemoryStore() *MemoryStore + func (s *MemoryStore) Exists(_ context.Context, key string) (bool, error) + func (s *MemoryStore) Put(_ context.Context, key string, ttl time.Duration) error + type Router struct + func NewRouter[DB any](tracker *Tracker, primary, replica DB) *Router[DB] + func (r *Router[DB]) ForRead(ctx context.Context) DB + func (r *Router[DB]) ForWrite() DB + type Store interface + Exists func(ctx context.Context, key string) (bool, error) + Put func(ctx context.Context, key string, ttl time.Duration) error + type Tracker struct + func NewTracker(store Store, key func(ctx context.Context) string, opts ...TrackerOption) *Tracker + func (t *Tracker) IsSticky(ctx context.Context) bool + func (t *Tracker) MarkCommitted(ctx context.Context) + func (t *Tracker) MarkRolledBack(ctx context.Context) + func (t *Tracker) MarkUncommitted(ctx context.Context) + func (t *Tracker) MarkWritten(ctx context.Context) + func (t *Tracker) Middleware(next http.Handler) http.Handler + func (t *Tracker) NewContext(ctx context.Context) context.Context + func (t *Tracker) NewStickyContext(ctx context.Context) context.Context + type TrackerOption func(*Tracker) + func WithErrorHandler(f func(ctx context.Context, err error)) TrackerOption + func WithPrefix(prefix string) TrackerOption + func WithPutInterval(interval time.Duration) TrackerOption + func WithTTL(ttl time.Duration) TrackerOption