Example #1
0
File: api_test.go Project: bac/juju
func (s *APIManifoldSuite) SetUpTest(c *gc.C) {
	s.IsolationSuite.SetUpTest(c)
	s.Stub = testing.Stub{}
	s.worker = &dummyWorker{}
	s.manifold = engine.APIManifold(engine.APIManifoldConfig{
		APICallerName: "api-caller-name",
	}, s.newWorker)
}
Example #2
0
File: manifold.go Project: bac/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 := engine.APIManifoldConfig{
		APICallerName: config.APICallerName,
	}
	return engine.APIManifold(typedConfig, config.newWorker)
}
Example #3
0
File: manifold.go Project: bac/juju
// Manifold returns a Manifold that runs a unitassigner worker.
func Manifold(config ManifoldConfig) dependency.Manifold {
	return engine.APIManifold(
		engine.APIManifoldConfig(config),
		manifoldStart,
	)
}
Example #4
0
File: manifold.go Project: bac/juju
// Manifold returns a dependency.Manifold that runs an applicationscaler worker.
func Manifold(config ManifoldConfig) dependency.Manifold {
	return engine.APIManifold(
		engine.APIManifoldConfig{config.APICallerName},
		config.start,
	)
}