Ejemplo n.º 1
func (s *AgentManifoldSuite) SetUpTest(c *gc.C) {
	s.Stub = testing.Stub{}
	s.worker = &dummyWorker{}
	s.manifold = util.AgentManifold(util.AgentManifoldConfig{
		AgentName: "agent-name",
	}, s.newWorker)
Ejemplo n.º 2
// Manifold returns a dependency.Manifold that governs the construction of
// and access to a machine-wide lock intended to prevent various operations
// from running concurrently and interfering with one another. Examples (are
// not limited to): hook executions, package installation, synchronisation
// of reboots.
// Clients can access the lock by passing a **fslock.Lock into the out param
// of their GetResourceFunc.
func Manifold(config ManifoldConfig) dependency.Manifold {
	manifold := util.AgentManifold(util.AgentManifoldConfig(config), newWorker)
	manifold.Output = outputFunc
	return manifold