Documentation
¶
Overview ¶
Package runtime defines an internal runtime to work with resolver configurations.
Overall, this package makes it easier to work with embedded types due to its reliance on interfaces instead of Raw like the external versions.
This package should be preferred whenever working with non-serialization relevant routines (such as working with accesses or components).
This package SHOULD NOT be used for serialization, and any kind of attempt at serialization will fail on purpose, be buggy and is not supported!
Instead, use dedicated converters to the scheme versions available.
The conversions offered in this package are guaranteed to be lossless unless otherwise specified, so it is usually safe to convert back and forth between scheme versions.
Index ¶
- type Configdeprecated
- type Resolverdeprecated
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config
deprecated
type Config struct { Type runtime.Type `json:"-"` // Resolvers define a list of OCM repository specifications to be used to resolve // dedicated component versions. // All matching entries are tried to lookup a component version in the following // order: // - highest priority first // // The default priority is spec.DefaultLookupPriority (10). // // Repositories with a specified prefix are only even tried if the prefix // matches the component name. // // If resolvers are defined, it is possible to use component version names on the // command line without a repository. The names are resolved with the specified // resolution rule. // // They are also used as default lookup repositories to lookup component references // for recursive operations on component versions («--lookup» option). Resolvers []Resolver `json:"-"` }
Config is the OCM configuration type for configuring legacy fallback resolvers.
- type: ocm.config.ocm.software resolvers:
- repository: type: CommonTransportFormat/v1 filePath: ./ocm/primary-transport-archive priority: 100
- repository: type: CommonTransportFormat/v1 filePath: ./ocm/primary-transport-archive priority: 10
Deprecated: Resolvers are deprecated and are only added for backwards compatibility. New concepts will likely be introduced in the future (contributions welcome!).
+k8s:deepcopy-gen:interfaces=ocm.software/open-component-model/bindings/go/runtime.Typed +k8s:deepcopy-gen=true +ocm:typegen=true
func ConvertFromV1
deprecated
ConvertFromV1 converts a resolver configuration from the v1 version to the runtime.Config type.
Deprecated: Resolvers are deprecated and are only added for backwards compatibility. New concepts will likely be introduced in the future (contributions welcome!).
func Merge
deprecated
Merge merges the provided configs into a single config. If the configs have multiple repositories with the same priority, the order of configs is relevant (first will be preferred).
Deprecated: Resolvers are deprecated and are only added for backwards compatibility. New concepts will likely be introduced in the future (contributions welcome!).
func (*Config) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Config.
func (*Config) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Config) DeepCopyTyped ¶
DeepCopyTyped is an autogenerated deepcopy function, copying the receiver, creating a new goruntime.Typed.
type Resolver
deprecated
type Resolver struct { // Repository is the OCM repository specification to be used for resolving // component versions. Repository runtime.Typed `json:"-"` // Optionally, a component name prefix can be given. // It limits the usage of the repository to resolve only // components with the given name prefix (always complete name segments). Prefix string `json:"-"` // An optional priority can be used to influence the lookup order. Larger value // means higher priority (default DefaultLookupPriority). Priority int `json:"-"` }
Resolver assigns a priority and a prefix to a single OCM repository specification to allow defining a lookup order for component versions.
Deprecated: Resolvers are deprecated and are only added for backwards compatibility. New concepts will likely be introduced in the future (contributions welcome!).
+k8s:deepcopy-gen=true
func (*Resolver) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Resolver.
func (*Resolver) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.