Farquhar's deal includes an invite to big-league camp this spring, a source told MLB.com's Mark Feinsand.
Last April, Farquhar collapsed in the dugout during a game as a member of the Chicago White Sox after suffering a life-threatening brain hemorrhage. He later underwent brain surgery and missed the remainder of the season.
He returned to the White Sox in June to throw out a ceremonial first pitch and was subsequently cleared to begin a throwing program.
For his career, the 31-year-old right-hander has recorded a 3.93 ERA, 1.26 WHIP, and 10.21 K/9 over 272 1/3 innings.