github.com/cloud-green/juju@v0.0.0-20151002100041-a00291338d3d/worker/metrics/collect/export_test.go (about)

     1  // Copyright 2015 Canonical Ltd.
     2  // Licensed under the AGPLv3, see LICENCE file for details.
     3  
     4  package collect
     5  
     6  import "github.com/juju/juju/worker/uniter/runner"
     7  
     8  var (
     9  	// NewCollect allows patching the function that creates the metric collection
    10  	// entity.
    11  	NewCollect = &newCollect
    12  
    13  	// NewRecorder allows patching the function that creates the metric recorder.
    14  	NewRecorder = &newRecorder
    15  
    16  	// NewHookContext returns a new hook context used to collect metrics.
    17  	// It is exported here for calling from tests, but not patching.
    18  	NewHookContext = newHookContext
    19  )
    20  
    21  // Ensure hookContext is a runner.Context.
    22  var _ runner.Context = (*hookContext)(nil)