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