a
3 years ago
55 changed files with 1057 additions and 483 deletions
-
10.github/dependabot.yml
-
14.github/workflows/binaries_dev.yml
-
6.github/workflows/binaries_release0.yml
-
6.github/workflows/binaries_release1.yml
-
6.github/workflows/binaries_release2.yml
-
6.github/workflows/binaries_release3.yml
-
17.github/workflows/container_dev.yml
-
17.github/workflows/container_latest.yml
-
15.github/workflows/container_release1.yml
-
15.github/workflows/container_release2.yml
-
15.github/workflows/container_release3.yml
-
7.github/workflows/go.yml
-
2README.md
-
8docker/compose/local-cluster-compose.yml
-
128go.mod
-
727go.sum
-
4k8s/helm_charts2/Chart.yaml
-
2weed/command/benchmark.go
-
7weed/command/filer.go
-
2weed/command/iam.go
-
11weed/command/master.go
-
11weed/command/master_follower.go
-
2weed/command/server.go
-
8weed/filer/filechunks.go
-
2weed/filer/filer.go
-
3weed/filer/meta_aggregator.go
-
1weed/filer/read_write.go
-
2weed/iamapi/iamapi_server.go
-
1weed/mount/weedfs_file_mkrm.go
-
1weed/mount/weedfs_file_sync.go
-
2weed/pb/grpc_client_server.go
-
4weed/pb/remote.proto
-
105weed/pb/remote_pb/remote.pb.go
-
15weed/pb/server_address.go
-
50weed/remote_storage/s3/contabo.go
-
30weed/s3api/filer_multipart.go
-
83weed/s3api/filer_multipart_test.go
-
1weed/s3api/filer_util.go
-
36weed/s3api/s3api_object_multipart_handlers.go
-
2weed/server/filer_grpc_server.go
-
2weed/server/filer_server.go
-
2weed/server/filer_server_handlers_tagging.go
-
2weed/server/filer_server_handlers_write_autochunk.go
-
2weed/server/master_server.go
-
40weed/server/raft_server.go
-
2weed/server/volume_server.go
-
21weed/server/volume_server_handlers.go
-
2weed/shell/commands.go
-
2weed/storage/erasure_coding/ec_encoder.go
-
13weed/topology/volume_layout.go
-
15weed/util/config.go
-
2weed/util/constants.go
-
2weed/util/net_timeout.go
-
4weed/wdclient/masterclient.go
-
3weed/weed.go
@ -0,0 +1,10 @@ |
|||||
|
version: 2 |
||||
|
updates: |
||||
|
- package-ecosystem: "github-actions" |
||||
|
directory: "/" |
||||
|
schedule: |
||||
|
interval: "daily" |
||||
|
- package-ecosystem: gomod |
||||
|
directory: "/" |
||||
|
schedule: |
||||
|
interval: daily |
727
go.sum
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -1,5 +1,5 @@ |
|||||
apiVersion: v1 |
apiVersion: v1 |
||||
description: SeaweedFS |
description: SeaweedFS |
||||
name: seaweedfs |
name: seaweedfs |
||||
appVersion: "2.94" |
|
||||
version: "2.94" |
|
||||
|
appVersion: "2.96" |
||||
|
version: "2.96" |
@ -0,0 +1,50 @@ |
|||||
|
package s3 |
||||
|
|
||||
|
import ( |
||||
|
"fmt" |
||||
|
"os" |
||||
|
|
||||
|
"github.com/aws/aws-sdk-go/aws" |
||||
|
"github.com/aws/aws-sdk-go/aws/credentials" |
||||
|
"github.com/aws/aws-sdk-go/aws/session" |
||||
|
"github.com/aws/aws-sdk-go/service/s3" |
||||
|
"github.com/chrislusf/seaweedfs/weed/pb/remote_pb" |
||||
|
"github.com/chrislusf/seaweedfs/weed/remote_storage" |
||||
|
"github.com/chrislusf/seaweedfs/weed/util" |
||||
|
) |
||||
|
|
||||
|
func init() { |
||||
|
remote_storage.RemoteStorageClientMakers["contabo"] = new(ContaboRemoteStorageMaker) |
||||
|
} |
||||
|
|
||||
|
type ContaboRemoteStorageMaker struct{} |
||||
|
|
||||
|
func (s ContaboRemoteStorageMaker) HasBucket() bool { |
||||
|
return true |
||||
|
} |
||||
|
|
||||
|
func (s ContaboRemoteStorageMaker) Make(conf *remote_pb.RemoteConf) (remote_storage.RemoteStorageClient, error) { |
||||
|
client := &s3RemoteStorageClient{ |
||||
|
conf: conf, |
||||
|
} |
||||
|
accessKey := util.Nvl(conf.ContaboAccessKey, os.Getenv("ACCESS_KEY")) |
||||
|
secretKey := util.Nvl(conf.ContaboSecretKey, os.Getenv("SECRET_KEY")) |
||||
|
|
||||
|
config := &aws.Config{ |
||||
|
Endpoint: aws.String(conf.ContaboEndpoint), |
||||
|
Region: aws.String(conf.ContaboRegion), |
||||
|
S3ForcePathStyle: aws.Bool(true), |
||||
|
S3DisableContentMD5Validation: aws.Bool(true), |
||||
|
} |
||||
|
if accessKey != "" && secretKey != "" { |
||||
|
config.Credentials = credentials.NewStaticCredentials(accessKey, secretKey, "") |
||||
|
} |
||||
|
|
||||
|
sess, err := session.NewSession(config) |
||||
|
if err != nil { |
||||
|
return nil, fmt.Errorf("create contabo session: %v", err) |
||||
|
} |
||||
|
sess.Handlers.Build.PushFront(skipSha256PayloadSigning) |
||||
|
client.conn = s3.New(sess) |
||||
|
return client, nil |
||||
|
} |
Write
Preview
Loading…
Cancel
Save
Reference in new issue