Who were the gomasthas? how did they become good partners of the British management system?

Who were the gomasthas? how did they become good partners of the British management system?