Documentation
¶
Index ¶
- func Destination(opts *config.KanikoOptions, cacheKey string) (string, error)
- func IsAlreadyCached(err error) bool
- func IsExpired(err error) bool
- func IsNotFound(err error) bool
- func LocalSource(opts *config.CacheOptions, cacheKey string) (v1.Image, error)
- type AlreadyCachedErr
- type ExpiredErr
- type LayerCache
- type LayoutCache
- type NotFoundErr
- type RegistryCache
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Destination ¶
func Destination(opts *config.KanikoOptions, cacheKey string) (string, error)
Destination returns the repo where the layer should be stored If no cache is specified, one is inferred from the destination provided
func IsAlreadyCached ¶
IsAlreadyCached returns true if the supplied error is of the type AlreadyCachedErr otherwise it returns false.
func IsExpired ¶
IsExpired returns true if the supplied error is of the type ExpiredErr otherwise it returns false.
func IsNotFound ¶
IsNotFound returns true if the supplied error is of the type NotFoundErr otherwise it returns false.
func LocalSource ¶
LocalSource retrieves a source image from a local cache given cacheKey
Types ¶
type AlreadyCachedErr ¶
type AlreadyCachedErr struct {
// contains filtered or unexported fields
}
AlreadyCachedErr is returned when the Docker image requested for caching is already present in the cache.
func (AlreadyCachedErr) Error ¶
func (a AlreadyCachedErr) Error() string
type ExpiredErr ¶
type ExpiredErr struct {
// contains filtered or unexported fields
}
ExpiredErr is returned when the requested Docker image is present in the cache, but is expired according to the supplied TTL.
func (ExpiredErr) Error ¶
func (e ExpiredErr) Error() string
type LayerCache ¶
LayerCache is the layer cache
type LayoutCache ¶
type LayoutCache struct {
Opts *config.KanikoOptions
}
LayoutCache is the OCI image layout cache
func (*LayoutCache) RetrieveLayer ¶
func (lc *LayoutCache) RetrieveLayer(ck string) (v1.Image, error)
type NotFoundErr ¶
type NotFoundErr struct {
// contains filtered or unexported fields
}
NotFoundErr is returned when the requested Docker image is not present in the cache.
func (NotFoundErr) Error ¶
func (e NotFoundErr) Error() string
type RegistryCache ¶
type RegistryCache struct {
Opts *config.KanikoOptions
}
RegistryCache is the registry cache
func (*RegistryCache) RetrieveLayer ¶
func (rc *RegistryCache) RetrieveLayer(ck string) (v1.Image, error)
RetrieveLayer retrieves a layer from the cache given the cache key ck.