Skip to content

Commit

Permalink
Add MinioUseSSL
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Recachinas committed Oct 18, 2021
1 parent 362cc77 commit d1e0779
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
sigplot-data-service
dist/
.git/
ui/node_modules/
sdscache/
tests
1 change: 1 addition & 0 deletions sds_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ type Location struct {
Location string `json:"location"`
MinioAccessKey string `json:"minioAccessKey"`
MinioSecretKey string `json:"minioSecretKey"`
MinioUseSSL bool `json:"minioUseSSL"`
}

// Configuration Struct for Configuraion File
Expand Down
9 changes: 7 additions & 2 deletions sigplot_data_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -711,7 +711,12 @@ func openDataSource(url string, urlPosition int) (io.ReadSeeker, string, bool) {
file, inCache := getItemFromCache(cacheFileName, "miniocache/")
if !inCache {
log.Println("Minio File not in local file Cache, Need to fetch")
minioClient, err := minio.New(currentLocation.Location, currentLocation.MinioAccessKey, currentLocation.MinioSecretKey, false)
minioClient, err := minio.New(
currentLocation.Location,
currentLocation.MinioAccessKey,
currentLocation.MinioSecretKey,
currentLocation.MinioUseSSL,
)
elapsed := time.Since(start)
log.Println(" Time to Make connection ", elapsed)
if err != nil {
Expand Down Expand Up @@ -1984,7 +1989,7 @@ func (s *fileSystemServer) ServeHTTP(w http.ResponseWriter, r *http.Request) {
currentLocation.Location,
currentLocation.MinioAccessKey,
currentLocation.MinioSecretKey,
false,
currentLocation.MinioUseSSL,
)
if err != nil {
log.Println("Error Establishing Connection to Minio", err)
Expand Down

0 comments on commit d1e0779

Please sign in to comment.