Hi Zhitao, We actually do this in the `DC/OS` overlay modules we use in DC/OS. The overlay modules run as Mesos modules both in the Master and the Agent. You can see how we use the `MasterDetector` in the agent module: https://github.com/dcos/dcos-mesos-modules/blob/master/overlay/agent.cpp#L74
https://github.com/dcos/dcos-mesos-modules/blob/master/overlay/ should have more details of how the modules are actually used to build DC/OS overlay. On Tue, Jan 16, 2018 at 10:20 AM, Zhitao Li <zhitaoli...@gmail.com> wrote: > Hi, > > Some of our future development work on our custom modules requires them to > know the current leader of Mesos master. While it seems like we could > duplicate the logic in master/slave side to duplicate an instance of > `MasterDetector`, it seems more natural if we could figure out a clean way > to share the existing detector instance in slave to the module. > > Any comment on this idea? > > Thanks. > > -- > Cheers, > > Zhitao Li > -- Avinash Sridharan, Mesosphere +1 (323) 702 5245