Documentation ¶
Index ¶
Constants ¶
const (
DefaultToolPrefix = "tools/juju-"
)
Variables ¶
var ErrNoMatches = errors.New("no matching tools available")
var ErrNoTools = errors.New("no tools available")
Functions ¶
func SetToolPrefix ¶
func SetToolPrefix(prefix string)
SetToolPrefix changes the prefix used to compose the tools tarball file name.
func StorageName ¶
StorageName returns the name that is used to store and retrieve the given version of the juju tools.
func Upload ¶
func Upload(storage URLPutter, forceVersion *version.Number, fakeSeries ...string) (*state.Tools, error)
Upload builds whatever version of launchpad.net/juju-core is in $GOPATH, uploads it to the given storage, and returns a Tools instance describing them. If forceVersion is not nil, the uploaded tools bundle will report the given version number; if any fakeSeries are supplied, additional copies of the built tools will be uploaded for use by machines of those series. Juju tools built for one series do not necessarily run on another, but this func exists only for development use cases.
Types ¶
type Filter ¶
type Filter struct { // Release, if true, causes the filter to match only tools with a // non-development version number. Released bool // Number, if non-zero, causes the filter to match only tools with // that exact version number. Number version.Number // Series, if not empty, causes the filter to match only tools with // that series. Series string // Arch, if not empty, causes the filter to match only tools with // that architecture. Arch string }
Filter holds criteria for choosing tools.
type List ¶
List holds tools available in an environment. The order of tools within a List is not significant.
func ReadList ¶
ReadList returns a List of the tools in store with the given major version. If store contains no such tools, it returns ErrNoMatches.
func (List) Match ¶
Match returns a List, derived from src, containing only those tools that match the supplied Filter. If no tools match, it returns ErrNoMatches.