Use GetDuration() helper for MINIO_KMS_KEY_CACHE_INTERVAL as time.Duration (#19512)

Bonus: Use default duration of 10 seconds if invalid input < time.Second is specified
This commit is contained in:
Allan Roger Reid
2024-04-16 08:43:39 -07:00
committed by GitHub
parent 9246990496
commit 7c1f9667d1
5 changed files with 29 additions and 20 deletions
+1 -2
View File
@@ -958,8 +958,7 @@ func handleKMSConfig() {
}
}
kmsLogger := Logger{}
KMS, err := kms.NewWithConfig(kmsConf, kmsLogger)
KMS, err := kms.NewWithConfig(kmsConf, KMSLogger{})
if err != nil {
logger.Fatal(err, "Unable to initialize a connection to KES as specified by the shell environment")
}