Documentation ¶
Index ¶
- func ConvertToV1alpha1(in metav1.Dependency) metav1alpha1.Dependency
- func ConvertToV1beta1(in metav1.Dependency) (v1beta1.Dependency, bool)
- type Cache
- type ImageResolver
- type Manager
- func (m *Manager) AddAll(ctx context.Context, d v1beta1.Dependency) (v1beta1.Dependency, []*xpkg.ParsedPackage, error)
- func (m *Manager) Resolve(ctx context.Context, d v1beta1.Dependency) (v1beta1.Dependency, []*xpkg.ParsedPackage, error)
- func (m *Manager) Versions(ctx context.Context, d v1beta1.Dependency) ([]string, error)
- func (m *Manager) View(ctx context.Context, deps []v1beta1.Dependency) (*View, error)
- func (m *Manager) Watch() <-chan cache.Event
- type Option
- type View
- type XpkgMarshaler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertToV1alpha1 ¶
func ConvertToV1alpha1(in metav1.Dependency) metav1alpha1.Dependency
ConvertToV1alpha1 converts v1.Dependency types to v1alpha1.Dependency types.
func ConvertToV1beta1 ¶
func ConvertToV1beta1(in metav1.Dependency) (v1beta1.Dependency, bool)
ConvertToV1beta1 converts v1.Dependency types to v1beta1.Dependency types.
Types ¶
type Cache ¶
type Cache interface { Get(v1beta1.Dependency) (*xpkg.ParsedPackage, error) Store(v1beta1.Dependency, *xpkg.ParsedPackage) error Versions(v1beta1.Dependency) ([]string, error) Watch() <-chan cache.Event }
Cache defines the API contract for working with a Cache.
type ImageResolver ¶
type ImageResolver interface { ResolveDigest(context.Context, v1beta1.Dependency) (string, error) ResolveImage(context.Context, v1beta1.Dependency) (string, v1.Image, error) ResolveTag(context.Context, v1beta1.Dependency) (string, error) }
ImageResolver defines the API contract for working with an ImageResolver.
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager defines a dependency Manager
func (*Manager) AddAll ¶
func (m *Manager) AddAll(ctx context.Context, d v1beta1.Dependency) (v1beta1.Dependency, []*xpkg.ParsedPackage, error)
AddAll resolves the given package as well as it's transitive dependencies. If storage is successful, the resolved dependency is returned, errors otherwise.
func (*Manager) Resolve ¶
func (m *Manager) Resolve(ctx context.Context, d v1beta1.Dependency) (v1beta1.Dependency, []*xpkg.ParsedPackage, error)
Resolve resolves the given package as well as it's transitive dependencies. If dependencies are not included in the current cache, an error is returned.
func (*Manager) Versions ¶
Versions returns the dependency versions corresponding to the supplied v1beta1.Dependency that currently exist locally.
type Option ¶
type Option func(*Manager)
Option modifies the Manager.
func WithLogger ¶
WithLogger overrides the default logger with the supplied logger.
func WithResolver ¶
func WithResolver(r ImageResolver) Option
WithResolver sets the supplied dep.Resolver on the Manager.
func WithWatchInterval ¶
WithWatchInterval overrides the default watch interval for the Manager.
type View ¶
type View struct {
// contains filtered or unexported fields
}
View represents the processed View corresponding to some dependencies.
type XpkgMarshaler ¶
type XpkgMarshaler interface { FromImage(ixpkg.Image) (*xpkg.ParsedPackage, error) FromDir(afero.Fs, string) (*xpkg.ParsedPackage, error) }
XpkgMarshaler defines the API contract for working with an xpkg.ParsedPackage marshaler.