github.com/makyo/juju@v0.0.0-20160425123129-2608902037e9/apiserver/client/export_test.go (about)

     1  // Copyright 2012, 2013 Canonical Ltd.
     2  // Licensed under the AGPLv3, see LICENCE file for details.
     3  
     4  package client
     5  
     6  import "github.com/juju/juju/state"
     7  
     8  // Filtering exports
     9  var (
    10  	MatchPortRanges = matchPortRanges
    11  	MatchSubnet     = matchSubnet
    12  )
    13  
    14  // Status exports
    15  var (
    16  	ProcessMachines   = processMachines
    17  	MakeMachineStatus = makeMachineStatus
    18  )
    19  
    20  type MachineAndContainers machineAndContainers
    21  
    22  var (
    23  	GetEnvironment = &getEnvironment
    24  )
    25  
    26  type StateInterface stateInterface
    27  
    28  type Patcher interface {
    29  	PatchValue(ptr, value interface{})
    30  }
    31  
    32  func PatchState(p Patcher, st StateInterface) {
    33  	p.PatchValue(&getState, func(*state.State) stateInterface {
    34  		return st
    35  	})
    36  }