mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-12-21 19:10:11 +08:00
remote object store gateway: disable tagging for backblaze
This commit is contained in:
@@ -24,6 +24,7 @@ func (s AliyunRemoteStorageMaker) HasBucket() bool {
|
|||||||
|
|
||||||
func (s AliyunRemoteStorageMaker) Make(conf *remote_pb.RemoteConf) (remote_storage.RemoteStorageClient, error) {
|
func (s AliyunRemoteStorageMaker) Make(conf *remote_pb.RemoteConf) (remote_storage.RemoteStorageClient, error) {
|
||||||
client := &s3RemoteStorageClient{
|
client := &s3RemoteStorageClient{
|
||||||
|
supportTagging: true,
|
||||||
conf: conf,
|
conf: conf,
|
||||||
}
|
}
|
||||||
accessKey := util.Nvl(conf.AliyunAccessKey, os.Getenv("ALICLOUD_ACCESS_KEY_ID"))
|
accessKey := util.Nvl(conf.AliyunAccessKey, os.Getenv("ALICLOUD_ACCESS_KEY_ID"))
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ func (s BackBlazeRemoteStorageMaker) HasBucket() bool {
|
|||||||
|
|
||||||
func (s BackBlazeRemoteStorageMaker) Make(conf *remote_pb.RemoteConf) (remote_storage.RemoteStorageClient, error) {
|
func (s BackBlazeRemoteStorageMaker) Make(conf *remote_pb.RemoteConf) (remote_storage.RemoteStorageClient, error) {
|
||||||
client := &s3RemoteStorageClient{
|
client := &s3RemoteStorageClient{
|
||||||
|
supportTagging: false,
|
||||||
conf: conf,
|
conf: conf,
|
||||||
}
|
}
|
||||||
config := &aws.Config{
|
config := &aws.Config{
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ func (s BaiduRemoteStorageMaker) HasBucket() bool {
|
|||||||
|
|
||||||
func (s BaiduRemoteStorageMaker) Make(conf *remote_pb.RemoteConf) (remote_storage.RemoteStorageClient, error) {
|
func (s BaiduRemoteStorageMaker) Make(conf *remote_pb.RemoteConf) (remote_storage.RemoteStorageClient, error) {
|
||||||
client := &s3RemoteStorageClient{
|
client := &s3RemoteStorageClient{
|
||||||
|
supportTagging: true,
|
||||||
conf: conf,
|
conf: conf,
|
||||||
}
|
}
|
||||||
accessKey := util.Nvl(conf.BaiduAccessKey, os.Getenv("BDCLOUD_ACCESS_KEY"))
|
accessKey := util.Nvl(conf.BaiduAccessKey, os.Getenv("BDCLOUD_ACCESS_KEY"))
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ func (s ContaboRemoteStorageMaker) HasBucket() bool {
|
|||||||
|
|
||||||
func (s ContaboRemoteStorageMaker) Make(conf *remote_pb.RemoteConf) (remote_storage.RemoteStorageClient, error) {
|
func (s ContaboRemoteStorageMaker) Make(conf *remote_pb.RemoteConf) (remote_storage.RemoteStorageClient, error) {
|
||||||
client := &s3RemoteStorageClient{
|
client := &s3RemoteStorageClient{
|
||||||
|
supportTagging: true,
|
||||||
conf: conf,
|
conf: conf,
|
||||||
}
|
}
|
||||||
accessKey := util.Nvl(conf.ContaboAccessKey, os.Getenv("ACCESS_KEY"))
|
accessKey := util.Nvl(conf.ContaboAccessKey, os.Getenv("ACCESS_KEY"))
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ func (s FilebaseRemoteStorageMaker) HasBucket() bool {
|
|||||||
|
|
||||||
func (s FilebaseRemoteStorageMaker) Make(conf *remote_pb.RemoteConf) (remote_storage.RemoteStorageClient, error) {
|
func (s FilebaseRemoteStorageMaker) Make(conf *remote_pb.RemoteConf) (remote_storage.RemoteStorageClient, error) {
|
||||||
client := &s3RemoteStorageClient{
|
client := &s3RemoteStorageClient{
|
||||||
|
supportTagging: true,
|
||||||
conf: conf,
|
conf: conf,
|
||||||
}
|
}
|
||||||
accessKey := util.Nvl(conf.FilebaseAccessKey, os.Getenv("AWS_ACCESS_KEY_ID"))
|
accessKey := util.Nvl(conf.FilebaseAccessKey, os.Getenv("AWS_ACCESS_KEY_ID"))
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ func (s s3RemoteStorageMaker) HasBucket() bool {
|
|||||||
|
|
||||||
func (s s3RemoteStorageMaker) Make(conf *remote_pb.RemoteConf) (remote_storage.RemoteStorageClient, error) {
|
func (s s3RemoteStorageMaker) Make(conf *remote_pb.RemoteConf) (remote_storage.RemoteStorageClient, error) {
|
||||||
client := &s3RemoteStorageClient{
|
client := &s3RemoteStorageClient{
|
||||||
|
supportTagging: true,
|
||||||
conf: conf,
|
conf: conf,
|
||||||
}
|
}
|
||||||
config := &aws.Config{
|
config := &aws.Config{
|
||||||
@@ -61,9 +62,10 @@ func (s s3RemoteStorageMaker) Make(conf *remote_pb.RemoteConf) (remote_storage.R
|
|||||||
type s3RemoteStorageClient struct {
|
type s3RemoteStorageClient struct {
|
||||||
conf *remote_pb.RemoteConf
|
conf *remote_pb.RemoteConf
|
||||||
conn s3iface.S3API
|
conn s3iface.S3API
|
||||||
|
supportTagging bool
|
||||||
}
|
}
|
||||||
|
|
||||||
var _ = remote_storage.RemoteStorageClient(&s3RemoteStorageClient{})
|
var _ = remote_storage.RemoteStorageClient(&s3RemoteStorageClient{supportTagging: true})
|
||||||
|
|
||||||
func (s *s3RemoteStorageClient) Traverse(remote *remote_pb.RemoteStorageLocation, visitFn remote_storage.VisitFunc) (err error) {
|
func (s *s3RemoteStorageClient) Traverse(remote *remote_pb.RemoteStorageLocation, visitFn remote_storage.VisitFunc) (err error) {
|
||||||
|
|
||||||
@@ -158,12 +160,14 @@ func (s *s3RemoteStorageClient) WriteFile(loc *remote_pb.RemoteStorageLocation,
|
|||||||
|
|
||||||
// process tagging
|
// process tagging
|
||||||
tags := ""
|
tags := ""
|
||||||
|
if s.supportTagging {
|
||||||
for k, v := range entry.Extended {
|
for k, v := range entry.Extended {
|
||||||
if len(tags) > 0 {
|
if len(tags) > 0 {
|
||||||
tags = tags + "&"
|
tags = tags + "&"
|
||||||
}
|
}
|
||||||
tags = tags + k + "=" + string(v)
|
tags = tags + k + "=" + string(v)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Upload the file to S3.
|
// Upload the file to S3.
|
||||||
_, err = uploader.Upload(&s3manager.UploadInput{
|
_, err = uploader.Upload(&s3manager.UploadInput{
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ func (s StorjRemoteStorageMaker) HasBucket() bool {
|
|||||||
|
|
||||||
func (s StorjRemoteStorageMaker) Make(conf *remote_pb.RemoteConf) (remote_storage.RemoteStorageClient, error) {
|
func (s StorjRemoteStorageMaker) Make(conf *remote_pb.RemoteConf) (remote_storage.RemoteStorageClient, error) {
|
||||||
client := &s3RemoteStorageClient{
|
client := &s3RemoteStorageClient{
|
||||||
|
supportTagging: true,
|
||||||
conf: conf,
|
conf: conf,
|
||||||
}
|
}
|
||||||
accessKey := util.Nvl(conf.StorjAccessKey, os.Getenv("AWS_ACCESS_KEY_ID"))
|
accessKey := util.Nvl(conf.StorjAccessKey, os.Getenv("AWS_ACCESS_KEY_ID"))
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ func (s TencentRemoteStorageMaker) HasBucket() bool {
|
|||||||
|
|
||||||
func (s TencentRemoteStorageMaker) Make(conf *remote_pb.RemoteConf) (remote_storage.RemoteStorageClient, error) {
|
func (s TencentRemoteStorageMaker) Make(conf *remote_pb.RemoteConf) (remote_storage.RemoteStorageClient, error) {
|
||||||
client := &s3RemoteStorageClient{
|
client := &s3RemoteStorageClient{
|
||||||
|
supportTagging: true,
|
||||||
conf: conf,
|
conf: conf,
|
||||||
}
|
}
|
||||||
accessKey := util.Nvl(conf.TencentSecretId, os.Getenv("COS_SECRETID"))
|
accessKey := util.Nvl(conf.TencentSecretId, os.Getenv("COS_SECRETID"))
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ func (s WasabiRemoteStorageMaker) HasBucket() bool {
|
|||||||
|
|
||||||
func (s WasabiRemoteStorageMaker) Make(conf *remote_pb.RemoteConf) (remote_storage.RemoteStorageClient, error) {
|
func (s WasabiRemoteStorageMaker) Make(conf *remote_pb.RemoteConf) (remote_storage.RemoteStorageClient, error) {
|
||||||
client := &s3RemoteStorageClient{
|
client := &s3RemoteStorageClient{
|
||||||
|
supportTagging: true,
|
||||||
conf: conf,
|
conf: conf,
|
||||||
}
|
}
|
||||||
accessKey := util.Nvl(conf.WasabiAccessKey)
|
accessKey := util.Nvl(conf.WasabiAccessKey)
|
||||||
|
|||||||
Reference in New Issue
Block a user