Documentation
¶
Overview ¶
Package source resolves a Plugin's pinned source pointer into a concrete commit (git) or digest (oci) and loads the bundle files at that pin. The registry does NOT host plugin bundles — this package is how the controller (at resolve time) and deploys (at materialize time) turn a Plugin.Spec.Source into an in-memory bundle.CanonicalBundle.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // ErrUnsupportedSource marks a source the resolver cannot handle — a // TERMINAL condition (retrying will not help). OCI sources and non-GitHub // git hosts are currently unsupported. ErrUnsupportedSource = errors.New("source: unsupported plugin source") // ErrSourceNotFound marks a ref that resolves to no commit on the remote // (deleted/typo'd branch or tag, or a non-existent SHA) — TERMINAL. ErrSourceNotFound = errors.New("source: git ref not found") )
Functions ¶
This section is empty.
Types ¶
type GitResolver ¶
type GitResolver struct{}
GitResolver resolves git sources: it resolves the ref to a commit SHA via `git ls-remote` (no clone) and then shallow-clones that exact commit. It shells out to system git with ambient credentials, and only github.com is supported today (matching existing skill/agent source behavior). OCI sources are not yet implemented.
func NewGitResolver ¶
func NewGitResolver() *GitResolver
NewGitResolver returns a git-backed Resolver.
func (*GitResolver) Resolve ¶
func (r *GitResolver) Resolve(ctx context.Context, p *v1alpha1.Plugin) (*v1alpha1.PluginResolvedSource, *bundle.CanonicalBundle, error)
type Resolver ¶
type Resolver interface {
Resolve(ctx context.Context, p *v1alpha1.Plugin) (*v1alpha1.PluginResolvedSource, *bundle.CanonicalBundle, error)
}
Resolver pins a plugin's source and loads its bundle. Transient failures (network, clone) are returned as plain errors (retryable); permanent rejections wrap ErrUnsupportedSource, and malformed bundle content wraps bundle.ErrInvalidBundle — both terminal.