github.com/niedbalski/juju@v0.0.0-20190215020005-8ff100488e47/apiserver/facades/controller/instancepoller/export_test.go (about)

     1  // Copyright 2015 Canonical Ltd.
     2  // Licensed under the AGPLv3, see LICENCE file for details.
     3  
     4  package instancepoller
     5  
     6  import "github.com/juju/juju/state"
     7  
     8  type Patcher interface {
     9  	PatchValue(ptr, value interface{})
    10  }
    11  
    12  func PatchState(p Patcher, st StateInterface) {
    13  	p.PatchValue(&getState, func(*state.State, *state.Model) StateInterface {
    14  		return st
    15  	})
    16  }