示例#1
0
文件: api_test.go 项目: makyo/juju
func (s *ApiManifoldSuite) SetUpTest(c *gc.C) {
	s.IsolationSuite.SetUpTest(c)
	s.Stub = testing.Stub{}
	s.worker = &dummyWorker{}
	s.manifold = util.ApiManifold(util.ApiManifoldConfig{
		APICallerName: "api-caller-name",
	}, s.newWorker)
}
示例#2
0
文件: manifold.go 项目: makyo/juju
// Manifold returns a dependency manifold that runs a logger
// worker, using the resource names defined in the supplied config.
func Manifold(config ManifoldConfig) dependency.Manifold {
	typedConfig := util.ApiManifoldConfig{
		APICallerName: config.APICallerName,
	}
	return util.ApiManifold(typedConfig, config.newWorker)
}
示例#3
0
文件: manifold.go 项目: makyo/juju
// Manifold returns a Manifold that runs a unitassigner worker.
func Manifold(config ManifoldConfig) dependency.Manifold {
	return util.ApiManifold(
		util.ApiManifoldConfig(config),
		manifoldStart,
	)
}
示例#4
0
文件: manifold.go 项目: makyo/juju
// Manifold returns a dependency.Manifold that runs a servicescaler worker.
func Manifold(config ManifoldConfig) dependency.Manifold {
	return util.ApiManifold(
		util.ApiManifoldConfig{config.APICallerName},
		config.start,
	)
}