github.com/niedbalski/juju@v0.0.0-20190215020005-8ff100488e47/worker/httpserver/shim.go (about) 1 // Copyright 2018 Canonical Ltd. 2 // Licensed under the AGPLv3, see LICENCE file for details. 3 4 package httpserver 5 6 import ( 7 "gopkg.in/juju/worker.v1" 8 9 "github.com/juju/juju/controller" 10 "github.com/juju/juju/state" 11 ) 12 13 // NewWorkerShim calls through to NewWorker, and exists only 14 // to adapt to the signature of ManifoldConfig.NewWorker. 15 func NewWorkerShim(config Config) (worker.Worker, error) { 16 return NewWorker(config) 17 } 18 19 // GetControllerConfig gets the controller config from a *State - it 20 // exists so we can test the manifold without a StateSuite. 21 func GetControllerConfig(st *state.State) (controller.Config, error) { 22 return st.ControllerConfig() 23 }