diff options
| author | Chris Lu <chris.lu@gmail.com> | 2019-04-20 11:35:20 -0700 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2019-04-20 11:35:23 -0700 |
| commit | 6fc1f53018685e6842c68883af67128fbc0bd522 (patch) | |
| tree | d909cc811e9259a20d4c88f9cc1cd763fde55396 /weed/operation/tail_volume.go | |
| parent | 61720e6f75f4fccadff7f5fab7320b9c9237ae87 (diff) | |
| download | seaweedfs-6fc1f53018685e6842c68883af67128fbc0bd522.tar.xz seaweedfs-6fc1f53018685e6842c68883af67128fbc0bd522.zip | |
shell: add command volume.move
Diffstat (limited to 'weed/operation/tail_volume.go')
| -rw-r--r-- | weed/operation/tail_volume.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/weed/operation/tail_volume.go b/weed/operation/tail_volume.go index 0c4f96654..7de9acad1 100644 --- a/weed/operation/tail_volume.go +++ b/weed/operation/tail_volume.go @@ -22,9 +22,13 @@ func TailVolume(master string, grpcDialOption grpc.DialOption, vid needle.Volume volumeServer := lookup.Locations[0].Url + return TailVolumeFromServer(volumeServer, grpcDialOption, vid, sinceNs, timeoutSeconds, fn) +} + +func TailVolumeFromServer(volumeServer string, grpcDialOption grpc.DialOption, vid needle.VolumeId, sinceNs uint64, timeoutSeconds int, fn func(n *needle.Needle) error) error { return WithVolumeServerClient(volumeServer, grpcDialOption, func(client volume_server_pb.VolumeServerClient) error { - stream, err := client.VolumeTail(context.Background(), &volume_server_pb.VolumeTailRequest{ + stream, err := client.VolumeTailSender(context.Background(), &volume_server_pb.VolumeTailSenderRequest{ VolumeId: uint32(vid), SinceNs: sinceNs, DrainingSeconds: uint32(timeoutSeconds), |
