feat: fixed missing cache params (#1340)

Signed-off-by: AlexsJones <alexsimonjones@gmail.com>
This commit is contained in:
Alex Jones
2024-12-04 10:30:57 +00:00
committed by GitHub
parent c3f448693d
commit 1363219b1b
3 changed files with 8 additions and 2 deletions

View File

@@ -71,7 +71,8 @@ func (h *Handler) AddConfig(ctx context.Context, i *schemav1.AddConfigRequest) (
remoteCache, err = cache.NewCacheProvider("s3", i.Cache.GetS3Cache().BucketName, i.Cache.GetS3Cache().Region, i.Cache.GetS3Cache().Endpoint, notUsedStorageAcc, notUsedContainerName, notUsedProjectId, i.Cache.GetS3Cache().Insecure)
case *schemav1.Cache_GcsCache:
remoteCache, err = cache.NewCacheProvider("gcs", i.Cache.GetGcsCache().BucketName, i.Cache.GetGcsCache().Region, notUsedEndpoint, notUsedStorageAcc, notUsedContainerName, i.Cache.GetGcsCache().GetProjectId(), notUsedInsecure)
case *schemav1.Cache_InterplexCache:
remoteCache, err = cache.NewCacheProvider("interplex", notUsedBucket, notUsedRegion, i.Cache.GetInterplexCache().Endpoint, notUsedStorageAcc, notUsedContainerName, notUsedProjectId, notUsedInsecure)
default:
return resp, status.Error(codes.InvalidArgument, "Invalid cache configuration")
}