Documentation ¶
Index ¶
- func DiskUsage(buildersMap map[string]string, builderImage string, platformsToClean []string, ...) error
- func NewPkgInfo() pkgInfo
- func PruneBuilder(buildersMap map[string]string, builderImage string, platformsToClean []string, ...) error
- type BuildOpt
- func WithBuildBuilderImage(image string) BuildOpt
- func WithBuildBuilderRestart(restart bool) BuildOpt
- func WithBuildBuilders(builders map[string]string) BuildOpt
- func WithBuildCacheDir(dir string) BuildOpt
- func WithBuildCacheProvider(c lktspec.CacheProvider) BuildOpt
- func WithBuildDocker(runner dockerRunner) BuildOpt
- func WithBuildForce() BuildOpt
- func WithBuildIgnoreCache() BuildOpt
- func WithBuildManifest() BuildOpt
- func WithBuildOutputWriter(w io.Writer) BuildOpt
- func WithBuildPlatforms(platforms ...imagespec.Platform) BuildOpt
- func WithBuildPull() BuildOpt
- func WithBuildPush() BuildOpt
- func WithBuildSkip() BuildOpt
- func WithBuildTargetDockerCache() BuildOpt
- func WithRelease(r string) BuildOpt
- type Pkg
- type PkglibConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DiskUsage ¶
func DiskUsage(buildersMap map[string]string, builderImage string, platformsToClean []string, verbose bool) error
DiskUsage of builder
func NewPkgInfo ¶
func NewPkgInfo() pkgInfo
Types ¶
type BuildOpt ¶
type BuildOpt func(bo *buildOpts) error
BuildOpt allows callers to specify options to Build
func WithBuildBuilderImage ¶
WithBuildBuilderImage set the builder container image to use.
func WithBuildBuilderRestart ¶
WithBuildBuilderRestart restart the builder container even if it already is running with the correct image version
func WithBuildBuilders ¶
WithBuildBuilders which builders, as named contexts per platform, to use
func WithBuildCacheDir ¶
WithBuildCacheDir provide a build cache directory to use
func WithBuildCacheProvider ¶
func WithBuildCacheProvider(c lktspec.CacheProvider) BuildOpt
WithBuildCacheProvider provides a cacheProvider to use. If nil, defaults to the one shipped with linuxkit
func WithBuildDocker ¶
func WithBuildDocker(runner dockerRunner) BuildOpt
WithBuildDocker provides a docker runner to use. If nil, defaults to the current platform
func WithBuildForce ¶
func WithBuildForce() BuildOpt
WithBuildForce forces a build even if an image already exists
func WithBuildIgnoreCache ¶
func WithBuildIgnoreCache() BuildOpt
WithBuildIgnoreCache when building an image, do not look in local cache for dependent images
func WithBuildManifest ¶
func WithBuildManifest() BuildOpt
WithBuildManifest creates a multi-arch manifest for the image
func WithBuildOutputWriter ¶
WithBuildOutputWriter set the output writer for messages. If nil, defaults to stdout
func WithBuildPlatforms ¶
WithBuildPlatforms which platforms to build for
func WithBuildPull ¶
func WithBuildPull() BuildOpt
WithBuildPull pull down the image to cache if it already exists in registry
func WithBuildPush ¶
func WithBuildPush() BuildOpt
WithBuildPush pushes the result of the build to the registry
func WithBuildSkip ¶
func WithBuildSkip() BuildOpt
WithBuildSkip skips the actual build and only pushes/releases (if configured)
func WithBuildTargetDockerCache ¶
func WithBuildTargetDockerCache() BuildOpt
WithBuildTargetDockerCache put the build target in the docker cache instead of the default linuxkit cache
func WithRelease ¶
WithRelease releases as the given version after push
type Pkg ¶
type Pkg struct {
// contains filtered or unexported fields
}
Pkg encapsulates information about a package's source
func NewFromConfig ¶
func NewFromConfig(cfg PkglibConfig, args ...string) ([]Pkg, error)
NewFromConfig creates a range of Pkg from a PkglibConfig and paths to packages.
func (Pkg) Index ¶
Index create an index for the package tag based on all arch-specific tags in the registry.
func (Pkg) ReleaseTag ¶
ReleaseTag returns the tag to use for a particular release of the package
func (Pkg) TrustEnabled ¶
TrustEnabled returns true if trust is enabled
type PkglibConfig ¶
type PkglibConfig struct { DisableCache *bool Network *bool Org *string BuildYML string Hash string HashCommit string HashPath string Dirty bool Dev bool }
PkglibConfig contains the configuration for the pkglib package. It is used to override the default behaviour of the package. Fields that are pointers are so that the caller can leave it as nil for "use whatever default pkglib has", while non-nil means "explicitly override".