launchpad.net/~rogpeppe/juju-core/500-errgo-fix@v0.0.0-20140213181702-000000002356/agent/tools/tools.go (about)

     1  // Copyright 2013 Canonical Ltd.
     2  // Licensed under the AGPLv3, see LICENCE file for details.
     3  
     4  package tools
     5  
     6  import (
     7  	"io"
     8  
     9  	"github.com/loggo/loggo"
    10  
    11  	"launchpad.net/juju-core/tools"
    12  	"launchpad.net/juju-core/version"
    13  )
    14  
    15  var logger = loggo.GetLogger("juju.agent.tools")
    16  
    17  // ToolsManager keeps track of a pool of tools
    18  type ToolsManager interface {
    19  
    20  	// ReadTools looks in the current storage to see what tools are
    21  	// available that match the given Binary version.
    22  	ReadTools(version version.Binary) (*tools.Tools, error)
    23  
    24  	// UnpackTools reads the compressed tarball from the io.Reader and
    25  	// extracts the tools to be used. tools is used to indicate what exact
    26  	// version are in the contents of the tarball
    27  	UnpackTools(tools *tools.Tools, r io.Reader) error
    28  }