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 })) }
func init() { detector.Register("zk://", detector.PluginFactory(func(spec string) (detector.Master, error) { return NewMasterDetector(spec) })) }
func init() { detector.Register("zk://", detector.PluginFactory(func(spec string, options ...detector.Option) (detector.Master, error) { return NewMasterDetector(spec, options...) })) }