func (s *SchedulerTestSuite) registerMockDetector(prefix string) error {
	address := ""
	if s != nil {
		address = s.master
	} else {
		address = "127.0.0.1:8080"
	}
	return detector.Register(prefix, detector.PluginFactory(func(spec string) (detector.Master, error) {
		return &MockDetector{address: address}, nil
	}))
}
Example #2
0
func init() {
	detector.Register("zk://", detector.PluginFactory(func(spec string) (detector.Master, error) {
		return NewMasterDetector(spec)
	}))
}
Example #3
0
func init() {
	detector.Register("zk://", detector.PluginFactory(func(spec string, options ...detector.Option) (detector.Master, error) {
		return NewMasterDetector(spec, options...)
	}))
}