mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-09-24 17:03:35 +08:00
tiered storage: add s3 endpoint for private s3 implementation
fix https://github.com/chrislusf/seaweedfs/issues/1238
This commit is contained in:
@@ -24,7 +24,7 @@ func getSession(region string) (s3iface.S3API, bool) {
|
||||
return sess, found
|
||||
}
|
||||
|
||||
func createSession(awsAccessKeyId, awsSecretAccessKey, region string) (s3iface.S3API, error) {
|
||||
func createSession(awsAccessKeyId, awsSecretAccessKey, region, endpoint string) (s3iface.S3API, error) {
|
||||
|
||||
sessionsLock.Lock()
|
||||
defer sessionsLock.Unlock()
|
||||
@@ -34,7 +34,8 @@ func createSession(awsAccessKeyId, awsSecretAccessKey, region string) (s3iface.S
|
||||
}
|
||||
|
||||
config := &aws.Config{
|
||||
Region: aws.String(region),
|
||||
Region: aws.String(region),
|
||||
Endpoint: aws.String(endpoint),
|
||||
}
|
||||
if awsAccessKeyId != "" && awsSecretAccessKey != "" {
|
||||
config.Credentials = credentials.NewStaticCredentials(awsAccessKeyId, awsSecretAccessKey, "")
|
||||
|
Reference in New Issue
Block a user