You can not select more than 25 topics
Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- package services
-
- import (
- clitypes "gitlink.org.cn/cloudream/storage2/client/types"
- "gitlink.org.cn/cloudream/storage2/common/models/datamap"
- )
-
- func getBlockTypeFromRed(red clitypes.Redundancy) string {
- switch red.(type) {
- case *clitypes.NoneRedundancy:
- return datamap.BlockTypeRaw
-
- case *clitypes.ECRedundancy:
- return datamap.BlockTypeEC
-
- case *clitypes.LRCRedundancy:
- return datamap.BlockTypeEC
-
- case *clitypes.SegmentRedundancy:
- return datamap.BlockTypeSegment
- }
- return ""
- }
|