change volume id type to topology.VolumeId

This commit is contained in:
Chris Lu
2012-08-23 22:20:37 -07:00
parent 0121f35c12
commit 31e4dbfe38
6 changed files with 17 additions and 15 deletions

View File

@@ -64,7 +64,7 @@ func (s *Store) Status() *[]*topology.VolumeInfo {
stats := new([]*topology.VolumeInfo)
for k, v := range s.volumes {
s := new(topology.VolumeInfo)
s.Id, s.Size = uint32(k), v.Size()
s.Id, s.Size = topology.VolumeId(k), v.Size()
*stats = append(*stats, s)
}
return stats
@@ -73,7 +73,7 @@ func (s *Store) Join(mserver string) {
stats := new([]*topology.VolumeInfo)
for k, v := range s.volumes {
s := new(topology.VolumeInfo)
s.Id, s.Size = uint32(k), v.Size()
s.Id, s.Size = topology.VolumeId(k), v.Size()
*stats = append(*stats, s)
}
bytes, _ := json.Marshal(stats)