예제 #1
0
파일: api_test.go 프로젝트: Pankov404/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 프로젝트: exekias/juju
// Manifold returns a Manifold that encapsulates a *Tracker and exposes it as
// an environs.Environ resource.
func Manifold(config ManifoldConfig) dependency.Manifold {
	manifold := util.ApiManifold(
		util.ApiManifoldConfig(config),
		manifoldStart,
	)
	manifold.Output = manifoldOutput
	return manifold
}
예제 #3
0
파일: manifold.go 프로젝트: imoapps/juju
// Manifold returns a dependency manifold that runs a proxy updater worker,
// using the api connection resource named in the supplied config.
func Manifold(config ManifoldConfig) dependency.Manifold {
	return util.ApiManifold(util.ApiManifoldConfig(config), newWorker)
}
예제 #4
0
// Manifold returns a Manifold that encapsulates the addresser worker.
func Manifold(config ManifoldConfig) dependency.Manifold {
	return util.ApiManifold(
		util.ApiManifoldConfig(config),
		manifoldStart,
	)
}
예제 #5
0
// 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,
	)
}