コード例 #1
0
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
	}))
}
コード例 #2
0
ファイル: plugin.go プロジェクト: GaizkaRubio/mesos-dns
func init() {
	detector.Register("zk://", detector.PluginFactory(func(spec string) (detector.Master, error) {
		return NewMasterDetector(spec)
	}))
}
コード例 #3
0
ファイル: plugin.go プロジェクト: COLDTURNIP/kubernetes
func init() {
	detector.Register("zk://", detector.PluginFactory(func(spec string, options ...detector.Option) (detector.Master, error) {
		return NewMasterDetector(spec, options...)
	}))
}