示例#1
0
// manifoldStart creates a *Tracker given a base.APICaller.
func manifoldStart(apiCaller base.APICaller) (worker.Worker, error) {
	w, err := NewTracker(Config{
		Observer: environment.NewFacade(apiCaller),
	})
	if err != nil {
		return nil, errors.Trace(err)
	}
	return w, nil
}
示例#2
0
文件: state.go 项目: Pankov404/juju
// Environment returns access to the Environment API
func (st *State) Environment() *environment.Facade {
	return environment.NewFacade(st)
}
示例#3
0
文件: manifold.go 项目: imoapps/juju
// newWorker is not currently tested; it should eventually replace New as the
// package's exposed factory func, and then all tests should pass through it.
func newWorker(apiCaller base.APICaller) (worker.Worker, error) {
	// TODO(fwereade): This shouldn't be an "environment" facade, it
	// should be specific to the proxyupdater, and be watching for
	// *proxy settings* changes, not just watching the "environment".
	return New(environment.NewFacade(apiCaller), false), nil
}