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
#155)

fix: don't allow to configure fallback or cache with nil Redis|S3 instances
  • Loading branch information
mcortesi authored Oct 1, 2024
1 parent 3588581 commit 24c4715
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 @@ -23,9 +23,15 @@ func populateTargets(targets []string, s3 store.PrecomputedKeyStore, redis *redi

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

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

case store.EigenDABackendType, store.MemoryBackendType:
Expand Down

0 comments on commit 24c4715

Please sign in to comment.