2015-05-26 00:58:41 -07:00
|
|
|
package operation
|
|
|
|
|
|
|
|
import (
|
2018-10-15 01:19:15 -07:00
|
|
|
"context"
|
2022-07-29 00:17:28 -07:00
|
|
|
"github.com/seaweedfs/seaweedfs/weed/pb"
|
|
|
|
"github.com/seaweedfs/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
|
|
|
)
|
|
|
|
|
2021-09-12 22:47:52 -07:00
|
|
|
func GetVolumeSyncStatus(server pb.ServerAddress, grpcDialOption grpc.DialOption, vid uint32) (resp *volume_server_pb.VolumeSyncStatusResponse, err error) {
|
2015-05-26 00:58:41 -07:00
|
|
|
|
2021-12-26 00:15:03 -08:00
|
|
|
WithVolumeServerClient(false, 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
|
|
|
}
|