mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-09-19 10:17:56 +08:00
ec shard info can be queried via VolumeList()
This commit is contained in:
14
weed/topology/data_node_ec.go
Normal file
14
weed/topology/data_node_ec.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package topology
|
||||
|
||||
import (
|
||||
"github.com/chrislusf/seaweedfs/weed/storage/erasure_coding"
|
||||
)
|
||||
|
||||
func (dn *DataNode) GetEcShards() (ret []erasure_coding.EcVolumeInfo) {
|
||||
dn.RLock()
|
||||
for _, ecVolumeInfo := range dn.ecShards {
|
||||
ret = append(ret, ecVolumeInfo)
|
||||
}
|
||||
dn.RUnlock()
|
||||
return ret
|
||||
}
|
Reference in New Issue
Block a user