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