2015-05-26 07:58:41 +00:00
|
|
|
package operation
|
|
|
|
|
|
|
|
import (
|
2018-10-15 08:19:15 +00:00
|
|
|
"context"
|
|
|
|
"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
|
|
|
)
|
|
|
|
|
2019-02-18 20:11:52 +00:00
|
|
|
func GetVolumeSyncStatus(server string, grpcDialOption grpc.DialOption, vid uint32) (resp *volume_server_pb.VolumeSyncStatusResponse, err error) {
|
2015-05-26 07:58:41 +00:00
|
|
|
|
2020-01-26 22:42:11 +00:00
|
|
|
WithVolumeServerClient(server, grpcDialOption, func(ctx context.Context, client volume_server_pb.VolumeServerClient) error {
|
2019-01-10 08:43:44 +00:00
|
|
|
|
2020-01-26 22:42:11 +00:00
|
|
|
resp, err = client.VolumeSyncStatus(ctx, &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
|
|
|
}
|