Documentation
¶
Overview ¶
Package cache provides an interface for caching boot assets.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrNoRedirect is returned when the cache does not support redirects. ErrNoRedirect = errors.New("redirects are not supported") // ErrCacheNotFound is returned when the requested asset is not found in the cache. ErrCacheNotFound = errors.New("not found in cache") // ErrNoReader is returned when the asset does not provide a reader. ErrNoReader = errors.New("asset does not provide a reader") )
Functions ¶
This section is empty.
Types ¶
type BootAsset ¶
type BootAsset interface {
Size() int64
Reader() (io.ReadCloser, error)
}
BootAsset is an interface to access a boot asset.
It is used to abstract the access to the boot asset, so that it can be implemented in different ways, such as a local file, a remote file.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package cdn implements a cache wrapper for boot assets, rewriting URLs to go through CDN.
|
Package cdn implements a cache wrapper for boot assets, rewriting URLs to go through CDN. |
|
Package registry implements a cache using an OCI registry.
|
Package registry implements a cache using an OCI registry. |
|
Package s3 implements a cache for boot assets using S3-compatible storage.
|
Package s3 implements a cache for boot assets using S3-compatible storage. |
Click to show internal directories.
Click to hide internal directories.