1
0
Fork 0
mirror of https://github.com/chrislusf/seaweedfs synced 2024-06-02 08:40:20 +02:00
seaweedfs/weed/operation/sync_volume.go

21 lines
535 B
Go

package operation
import (
"context"
"github.com/chrislusf/seaweedfs/weed/pb/volume_server_pb"
"google.golang.org/grpc"
)
func GetVolumeSyncStatus(server string, grpcDialOption grpc.DialOption, vid uint32) (resp *volume_server_pb.VolumeSyncStatusResponse, err error) {
WithVolumeServerClient(server, grpcDialOption, func(client volume_server_pb.VolumeServerClient) error {
resp, err = client.VolumeSyncStatus(context.Background(), &volume_server_pb.VolumeSyncStatusRequest{
VolumeId: vid,
})
return nil
})
return
}