Skip to content

Commit

Permalink
fix: don't allow to configure fallback or cache with nil Redis|S3 ins…
Browse files Browse the repository at this point in the history
…tances
  • Loading branch information
mcortesi committed Sep 27, 2024
1 parent d4ef8c5 commit 43416ea
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions server/load_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,15 @@ func populateTargets(targets []string, s3 store.PrecomputedKeyStore, redis *stor

switch b {
case store.Redis:
if redis == nil {
panic(fmt.Sprintf("Redis backend is not configured but specified in targets: %s", f))
}
stores[i] = redis

case store.S3:
if s3 == nil {
panic(fmt.Sprintf("S3 backend is not configured but specified in targets: %s", f))
}
stores[i] = s3

case store.EigenDA, store.Memory:
Expand Down

0 comments on commit 43416ea

Please sign in to comment.