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