github.com/axw/juju@v0.0.0-20161005053422-4bd6544d08d4/worker/terminationworker/manifold.go (about) 1 // Copyright 2015 Canonical Ltd. 2 // Licensed under the AGPLv3, see LICENCE file for details. 3 4 package terminationworker 5 6 import ( 7 "github.com/juju/juju/worker" 8 "github.com/juju/juju/worker/dependency" 9 ) 10 11 // Manifold returns a manifold whose worker returns ErrTerminateAgent 12 // if a termination signal is received by the process it's running in. 13 func Manifold() dependency.Manifold { 14 return dependency.Manifold{ 15 Start: func(_ dependency.Context) (worker.Worker, error) { 16 return NewWorker(), nil 17 }, 18 } 19 }