What was a Riding Officer?

During the 18th and early 19th century in Britain, smuggling was a huge enterprise. Riding officers became one element in the government’s arsenal against smuggling.