diff options
Diffstat (limited to 'go/topology/allocate_volume.go')
| -rw-r--r-- | go/topology/allocate_volume.go | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/go/topology/allocate_volume.go b/go/topology/allocate_volume.go index 77b4ac508..6562e9ac5 100644 --- a/go/topology/allocate_volume.go +++ b/go/topology/allocate_volume.go @@ -1,8 +1,8 @@ package topology import ( - "code.google.com/p/weed-fs/go/storage" - "code.google.com/p/weed-fs/go/util" + "github.com/chrislusf/weed-fs/go/storage" + "github.com/chrislusf/weed-fs/go/util" "encoding/json" "errors" "net/url" @@ -12,11 +12,12 @@ type AllocateVolumeResult struct { Error string } -func AllocateVolume(dn *DataNode, vid storage.VolumeId, collection string, rp *storage.ReplicaPlacement) error { +func AllocateVolume(dn *DataNode, vid storage.VolumeId, option *VolumeGrowOption) error { values := make(url.Values) values.Add("volume", vid.String()) - values.Add("collection", collection) - values.Add("replication", rp.String()) + values.Add("collection", option.Collection) + values.Add("replication", option.ReplicaPlacement.String()) + values.Add("ttl", option.Ttl.String()) jsonBlob, err := util.Post("http://"+dn.PublicUrl+"/admin/assign_volume", values) if err != nil { return err |
