Documentation ¶
Overview ¶
The registry package exists to manage ACIs for acbuild. The main difference between this package and rkt's store is that this package is optimised for many separate calls into the current ACI, as opposed to having a tinier footprint. When an ACI is fetched, it is immediately rendered onto the filesystem, so that when acbuild's run command is invoked many times there's no waiting for files to be untarred or uncompressed.
Index ¶
- Variables
- func GenImageID(path string) (string, error)
- type Registry
- func (r Registry) Fetch(imagename types.ACIdentifier, labels types.Labels, size uint, fetchDeps bool) error
- func (r Registry) FetchAndRender(imagename types.ACIdentifier, labels types.Labels, size uint) error
- func (r Registry) GetACI(name types.ACIdentifier, labels types.Labels) (string, error)
- func (r Registry) GetImageManifest(key string) (*schema.ImageManifest, error)
- func (r Registry) HashToKey(h hash.Hash) string
- func (r Registry) ReadStream(key string) (io.ReadCloser, error)
- func (r Registry) ResolveKey(key string) (string, error)
Constants ¶
This section is empty.
Variables ¶
var (
ErrNotFound = fmt.Errorf("ACI not in registry")
)
Functions ¶
func GenImageID ¶
Types ¶
type Registry ¶
type Registry struct { DepStoreTarPath string DepStoreExpandedPath string Insecure bool Debug bool }
func (Registry) Fetch ¶
func (r Registry) Fetch(imagename types.ACIdentifier, labels types.Labels, size uint, fetchDeps bool) error
Fetch will download the given image, and optionally its dependencies, into r.DepStoreTarPath
func (Registry) FetchAndRender ¶
func (r Registry) FetchAndRender(imagename types.ACIdentifier, labels types.Labels, size uint) error
FetchAndRender will fetch the given image and all of its dependencies if they have not been fetched yet, and will then render them on to the filesystem if they have not been rendered yet.
func (Registry) GetImageManifest ¶
func (r Registry) GetImageManifest(key string) (*schema.ImageManifest, error)
Returns the manifest for the ACI with the given key
func (Registry) ReadStream ¶
func (r Registry) ReadStream(key string) (io.ReadCloser, error)
Read the ACI contents stream given the key. Use ResolveKey to convert an image ID to the relative provider's key.