diff options
Diffstat (limited to 'go/topology/allocate_volume.go')
| -rw-r--r-- | go/topology/allocate_volume.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/go/topology/allocate_volume.go b/go/topology/allocate_volume.go index 77b4ac508..4aeef35f7 100644 --- a/go/topology/allocate_volume.go +++ b/go/topology/allocate_volume.go @@ -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 |
