sync_volume.go 535 B

1234567891011121314151617181920
  1. package operation
  2. import (
  3. "context"
  4. "github.com/chrislusf/seaweedfs/weed/pb/volume_server_pb"
  5. "google.golang.org/grpc"
  6. )
  7. func GetVolumeSyncStatus(server string, grpcDialOption grpc.DialOption, vid uint32) (resp *volume_server_pb.VolumeSyncStatusResponse, err error) {
  8. WithVolumeServerClient(server, grpcDialOption, func(client volume_server_pb.VolumeServerClient) error {
  9. resp, err = client.VolumeSyncStatus(context.Background(), &volume_server_pb.VolumeSyncStatusRequest{
  10. VolumeId: vid,
  11. })
  12. return nil
  13. })
  14. return
  15. }