Documentation
¶
Overview ¶
Package asset implements generation of Talos build assets.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
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.
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
Builder is the asset builder.
func NewBuilder ¶
func NewBuilder(logger *zap.Logger, artifactsManager *artifacts.Manager, cache cache.Cache, options Options) (*Builder, error)
NewBuilder creates a new asset builder.
func (*Builder) Build ¶
func (b *Builder) Build(ctx context.Context, prof profile.Profile, versionString, filename, filenameOverride string) (BootAsset, error)
Build the asset.
First, check if the asset has already been built and cached then use the cached version. If the asset hasn't been built yet, build it and cache it honoring the concurrency limit, and push it to the cache.
func (*Builder) Collect ¶
func (b *Builder) Collect(ch chan<- prometheus.Metric)
Collect implements prom.Collector interface.
func (*Builder) Describe ¶
func (b *Builder) Describe(ch chan<- *prometheus.Desc)
Describe implements prom.Collector interface.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package cache provides an interface for caching boot assets.
|
Package cache provides an interface for caching boot assets. |
|
cdn
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. |
|
registry
Package registry implements a cache using an OCI registry.
|
Package registry implements a cache using an OCI registry. |
|
s3
Package s3 implements a cache for boot assets using S3-compatible storage.
|
Package s3 implements a cache for boot assets using S3-compatible storage. |