Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Storage ¶
type Storage interface {
// AddTools adds the tools tarball and metadata into state,
// replacing existing metadata if any exists with the specified
// version.
AddTools(io.Reader, Metadata) error
// Tools returns the Metadata and tools tarball contents
// for the specified version if it exists, else an error
// satisfying errors.IsNotFound.
Tools(version.Binary) (Metadata, io.ReadCloser, error)
// AllMetadata returns metadata for the full list of tools in
// the catalogue.
AllMetadata() ([]Metadata, error)
// Metadata returns the Metadata for the specified version
// if it exists, else an error satisfying errors.IsNotFound.
Metadata(v version.Binary) (Metadata, error)
}
Storage provides methods for storing and retrieving tools by version.
func NewStorage ¶
func NewStorage( envUUID string, managedStorage blobstore.ManagedStorage, metadataCollection *mgo.Collection, runner jujutxn.Runner, ) Storage
NewStorage constructs a new Storage that stores tools tarballs in the provided ManagedStorage, and tools metadata in the provided collection using the provided transaction runner.
type StorageCloser ¶
StorageCloser extends the Storage interface with a Close method.
Click to show internal directories.
Click to hide internal directories.