Browse Source

增加分段上传冗余方式

feature_wq
Sydonian 1 year ago
parent
commit
fc44199f42
1 changed files with 12 additions and 0 deletions
  1. +12
    -0
      sdks/storage/models.go

+ 12
- 0
sdks/storage/models.go View File

@@ -40,6 +40,7 @@ var RedundancyUnion = serder.UseTypeUnionInternallyTagged(types.Ref(types.NewTyp
(*ECRedundancy)(nil),
(*LRCRedundancy)(nil),
(*SegmentRedundancy)(nil),
(*MultipartUploadRedundancy)(nil),
)), "type")

type NoneRedundancy struct {
@@ -229,6 +230,17 @@ func (b *SegmentRedundancy) CalcSegmentRange(start int64, end *int64) (segIdxSta
return
}

type MultipartUploadRedundancy struct {
serder.Metadata `union:"multipartUpload"`
Type string `json:"type"`
}

func NewMultipartUploadRedundancy() *MultipartUploadRedundancy {
return &MultipartUploadRedundancy{
Type: "multipartUpload",
}
}

type User struct {
UserID UserID `gorm:"column:UserID; primaryKey; type:bigint" json:"userID"`
Name string `gorm:"column:Name; type:varchar(255); not null" json:"name"`


Loading…
Cancel
Save