Skip to content

refactor: use variadic config pattern for all Redis stores#12

Merged
alexferl merged 1 commit into
masterfrom
mw_config
Apr 3, 2026
Merged

refactor: use variadic config pattern for all Redis stores#12
alexferl merged 1 commit into
masterfrom
mw_config

Conversation

@alexferl

@alexferl alexferl commented Apr 3, 2026

Copy link
Copy Markdown
Owner

Replace positional parameter constructors with variadic config pattern:

  • idempotency.NewRedisStore(client, cfg...)
  • ratelimit.NewRedisStore(client, cfg...)
  • cache.NewRedisStore(client, cfg...)
  • jwtauth.NewStorageAdapter(storage, cfg...)

This provides a consistent API with zerohttp middleware patterns and allows for optional configuration with sensible defaults.

BREAKING CHANGE: Old positional constructors are no longer supported.

Replace positional parameter constructors with variadic config pattern:
- idempotency.NewRedisStore(client, cfg...)
- ratelimit.NewRedisStore(client, cfg...)
- cache.NewRedisStore(client, cfg...)
- jwtauth.NewStorageAdapter(storage, cfg...)

This provides a consistent API with zerohttp middleware patterns and allows
for optional configuration with sensible defaults.

BREAKING CHANGE: Old positional constructors are no longer supported.

Signed-off-by: alexferl <me@alexferl.com>
@alexferl alexferl merged commit 5d571a5 into master Apr 3, 2026
84 of 85 checks passed
@alexferl alexferl deleted the mw_config branch April 3, 2026 01:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant