Documentation
¶
Index ¶
- type ExactTagConstraint
- type Filter
- func (f *Filter) GetConstraint(moduleName string) (VersionConstraint, bool)
- func (f *Filter) Len() int
- func (f *Filter) Match(mod *Module) bool
- func (f *Filter) ShouldMirrorReleaseChannels(moduleName string) bool
- func (f *Filter) UseLogger(logger params.Logger) *Filter
- func (f *Filter) VersionsToMirror(mod *Module) []string
- type FilterType
- type ImageDownloadList
- type ImageLayouts
- type Module
- type ModulesDownloadList
- type ModulesImageLayouts
- type Options
- type SemanticVersionConstraint
- type Service
- type VersionConstraint
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ExactTagConstraint ¶ added in v0.29.0
type ExactTagConstraint struct {
// contains filtered or unexported fields
}
func NewExactTagConstraint ¶ added in v0.29.0
func NewExactTagConstraint(tag string) *ExactTagConstraint
func NewExactTagConstraintWithChannel ¶ added in v0.29.0
func NewExactTagConstraintWithChannel(tag string, channel string) *ExactTagConstraint
func (*ExactTagConstraint) Channel ¶ added in v0.29.0
func (e *ExactTagConstraint) Channel() string
func (*ExactTagConstraint) HasChannelAlias ¶ added in v0.29.0
func (e *ExactTagConstraint) HasChannelAlias() bool
func (*ExactTagConstraint) IsExact ¶ added in v0.29.0
func (e *ExactTagConstraint) IsExact() bool
func (*ExactTagConstraint) Match ¶ added in v0.29.0
func (e *ExactTagConstraint) Match(version interface{}) bool
func (*ExactTagConstraint) Tag ¶ added in v0.29.0
func (e *ExactTagConstraint) Tag() string
type Filter ¶ added in v0.3.0
type Filter struct {
// contains filtered or unexported fields
}
Filter for modules by black and whitelists. Maps module names to minimal versions of these modules to be pulled. By default, this is a whitelist filter, but that can be changed via SetType.
func NewFilter ¶ added in v0.3.0
func NewFilter(filterExpressions []string, filterType FilterType) (*Filter, error)
func (*Filter) GetConstraint ¶ added in v0.29.0
func (f *Filter) GetConstraint(moduleName string) (VersionConstraint, bool)
func (*Filter) ShouldMirrorReleaseChannels ¶ added in v0.29.0
func (*Filter) VersionsToMirror ¶ added in v0.29.0
VersionsToMirror resolves module constraints from --include-module into concrete tags to pull. Returns nil when no explicit version tags should be added for this module.
For semver constraints (caret, tilde, ranges) only the highest patch in each (major, minor) bucket that satisfies the constraint is returned. This mirrors the platform-level discovery rule (filterOnlyLatestPatches in internal/mirror/platform/platform.go) and avoids pulling N redundant patches per minor when the user wires a single module pin like `module@v1.6.0`.
Anchor exception: versions named with an inclusive boundary operator (`>=` or `<=`) are always restored to the result if they exist in the registry. `>=1.40.0` literally encodes "v1.40.0 OR newer" — the user named v1.40.0 by hand and we MUST honour that even when a newer patch (v1.40.1) exists in the same minor. Caret (`^`) and tilde (`~`) are syntactic shorthand for a range; their lower bounds are NOT anchors.
Exact-tag constraints (`module@=vX.Y.Z`) bypass this filter — when the user asks for a specific tag they get exactly that tag.
Channel snapshot versions (alpha/beta/early-access/stable/rock-solid) are merged into the pull list outside this method, so an older patch that a channel still points at remains reachable through the channel snapshot even when filterOnlyLatestPatches drops it from the constraint set.
type FilterType ¶ added in v0.29.0
type FilterType int
const ( FilterTypeWhitelist FilterType = iota FilterTypeBlacklist )
type ImageDownloadList ¶ added in v0.22.9
type ImageDownloadList struct {
Module map[string]*puller.ImageMeta
ModuleReleaseChannels map[string]*puller.ImageMeta
ModuleExtra map[string]*puller.ImageMeta
// contains filtered or unexported fields
}
func NewImageDownloadList ¶ added in v0.22.9
func NewImageDownloadList(rootURL string) *ImageDownloadList
func (*ImageDownloadList) FillForTag ¶ added in v0.22.9
func (l *ImageDownloadList) FillForTag(tag string)
type ImageLayouts ¶ added in v0.22.9
type ImageLayouts struct {
// Modules is the main module image layout (modules/<name>/)
Modules *regimage.ImageLayout
// ModulesReleaseChannels is the release channel layout (modules/<name>/release/)
ModulesReleaseChannels *regimage.ImageLayout
// ExtraImages holds layouts for each extra image (modules/<name>/extra/<extra-name>/)
// Key is the extra image name (e.g., "scanner", "enforcer")
ExtraImages map[string]*regimage.ImageLayout
// contains filtered or unexported fields
}
func NewImageLayouts ¶ added in v0.22.9
func NewImageLayouts(rootFolder string) *ImageLayouts
func (*ImageLayouts) AsList ¶ added in v0.22.9
func (l *ImageLayouts) AsList() []layout.Path
AsList returns a list of layout.Path's in it. Undefined path's are not included in the list.
func (*ImageLayouts) GetOrCreateExtraLayout ¶ added in v0.26.4
func (l *ImageLayouts) GetOrCreateExtraLayout(extraName string) (*regimage.ImageLayout, error)
GetOrCreateExtraLayout returns or creates a layout for a specific extra image. Extra images are stored under: modules/<name>/extra/<extra-name>/
func (*ImageLayouts) HasImages ¶ added in v0.30.4
func (l *ImageLayouts) HasImages() bool
HasImages reports whether any sub-layout of this module contains at least one image manifest. Returns false when all layouts are empty (i.e. the module was discovered but no images were pulled into it).
type ModulesDownloadList ¶ added in v0.24.3
type ModulesDownloadList struct {
// contains filtered or unexported fields
}
func NewModulesDownloadList ¶ added in v0.24.3
func NewModulesDownloadList(rootURL string) *ModulesDownloadList
func (*ModulesDownloadList) FillModulesImages ¶ added in v0.24.3
func (l *ModulesDownloadList) FillModulesImages(modules []string)
func (*ModulesDownloadList) Module ¶ added in v0.24.3
func (l *ModulesDownloadList) Module(moduleName string) *ImageDownloadList
type ModulesImageLayouts ¶ added in v0.24.3
type ModulesImageLayouts struct {
// contains filtered or unexported fields
}
func NewModulesImageLayouts ¶ added in v0.24.3
func NewModulesImageLayouts(rootFolder string) *ModulesImageLayouts
func (*ModulesImageLayouts) AsList ¶ added in v0.24.3
func (l *ModulesImageLayouts) AsList() []layout.Path
AsList returns a list of layout.Path's from all modules. Undefined path's are not included in the list.
func (*ModulesImageLayouts) Module ¶ added in v0.24.3
func (l *ModulesImageLayouts) Module(moduleName string) *ImageLayouts
type Options ¶ added in v0.24.3
type Options struct {
// Filter is the module filter (whitelist/blacklist)
Filter *Filter
// OnlyExtraImages pulls only extra images without main module images
OnlyExtraImages bool
// SkipVexImages allows skipping VEX images
SkipVexImages bool
// BundleDir is the directory to store the bundle
BundleDir string
// BundleChunkSize is the max size of bundle chunks in bytes (0 = no chunking)
BundleChunkSize int64
// Timeout is the timeout for the modules access check
Timeout time.Duration
// DryRun prints the pull plan without downloading any image blobs
DryRun bool
}
Options contains configuration options for the modules service
type SemanticVersionConstraint ¶ added in v0.29.0
type SemanticVersionConstraint struct {
// contains filtered or unexported fields
}
func NewSemanticVersionConstraint ¶ added in v0.29.0
func NewSemanticVersionConstraint(c string) (*SemanticVersionConstraint, error)
func (*SemanticVersionConstraint) Anchors ¶ added in v0.30.10
func (s *SemanticVersionConstraint) Anchors() []*semver.Version
Anchors returns the versions explicitly named with an inclusive boundary operator (>=, <=). Callers must re-check membership against the constraint itself (Match) before consuming an anchor: an anchor that fails Match means the user wrote a contradictory constraint (e.g. `>=2.0.0 <1.0.0`) and we will not silently widen the range.
func (*SemanticVersionConstraint) HasChannelAlias ¶ added in v0.29.0
func (s *SemanticVersionConstraint) HasChannelAlias() bool
func (*SemanticVersionConstraint) IsExact ¶ added in v0.29.0
func (s *SemanticVersionConstraint) IsExact() bool
func (*SemanticVersionConstraint) Match ¶ added in v0.29.0
func (s *SemanticVersionConstraint) Match(version interface{}) bool
type Service ¶ added in v0.22.9
type Service struct {
// contains filtered or unexported fields
}