2015-05-26 15:58:41 +08:00
|
|
|
package operation
|
|
|
|
|
|
|
|
import (
|
2018-10-15 16:19:15 +08:00
|
|
|
"context"
|
|
|
|
"github.com/chrislusf/seaweedfs/weed/pb/volume_server_pb"
|
2019-02-20 17:01:01 +08:00
|
|
|
"google.golang.org/grpc"
|
2015-05-26 15:58:41 +08:00
|
|
|
)
|
|
|
|
|
2019-02-19 04:11:52 +08:00
|
|
|
func GetVolumeSyncStatus(server string, grpcDialOption grpc.DialOption, vid uint32) (resp *volume_server_pb.VolumeSyncStatusResponse, err error) {
|
2015-05-26 15:58:41 +08:00
|
|
|
|
2019-02-19 04:11:52 +08:00
|
|
|
WithVolumeServerClient(server, grpcDialOption, func(client volume_server_pb.VolumeServerClient) error {
|
2019-01-10 16:43:44 +08:00
|
|
|
|
2019-02-20 17:01:01 +08:00
|
|
|
resp, err = client.VolumeSyncStatus(context.Background(), &volume_server_pb.VolumeSyncStatusRequest{
|
2019-03-24 02:33:34 +08:00
|
|
|
VolumeId: vid,
|
2018-10-15 16:19:15 +08:00
|
|
|
})
|
|
|
|
return nil
|
|
|
|
})
|
|
|
|
|
|
|
|
return
|
2015-05-26 15:58:41 +08:00
|
|
|
}
|