Skip to content

Commit b3776af

Browse files
committed
refactor(staging): add explicit s3 case and exhaustiveness check for provider
1 parent bccb53f commit b3776af

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

flow/connectors/clickhouse/staging.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,12 @@ func createStagingStore(
3333
}
3434

3535
switch strings.ToLower(provider) {
36+
case "s3", "":
37+
return newS3StagingStoreFromConfig(ctx, config, bucketName, chVersion)
3638
case "gcs":
3739
return newGCSStagingStore(ctx, bucketName)
3840
default:
39-
return newS3StagingStoreFromConfig(ctx, config, bucketName, chVersion)
41+
return nil, fmt.Errorf("unsupported staging provider %q (expected s3 or gcs)", provider)
4042
}
4143
}
4244

0 commit comments

Comments
 (0)