Exemplo n.º 1
0
Arquivo: api_test.go Projeto: 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)
}
Exemplo n.º 2
0
Arquivo: manifold.go Projeto: 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)
}
Exemplo n.º 3
0
Arquivo: manifold.go Projeto: bac/juju
// Manifold returns a Manifold that runs a unitassigner worker.
func Manifold(config ManifoldConfig) dependency.Manifold {
	return engine.APIManifold(
		engine.APIManifoldConfig(config),
		manifoldStart,
	)
}
Exemplo n.º 4
0
Arquivo: manifold.go Projeto: 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,
	)
}