Documentation
¶
Overview ¶
Package identify puts every package the registry holds on a branch named after its id.
A branch was named after the package, which made the name the address of everything: the branch, the path aqua fetches a version from, the entry the catalogue lists. A package whose repository is renamed then has to be moved, and everything that already wrote the old name down is wrong. An id doesn't change when a name does, so the name becomes something the catalogue maps and nothing else depends on.
This runs once. It creates a branch per package and creates nothing else, so a second run sees the branches it made and has nothing to do.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
Controller identifies the packages of a registry.
func (*Controller) Identify ¶
func (c *Controller) Identify(ctx context.Context, logger *slog.Logger, w io.Writer, path string, dryRun bool) error
Identify gives every package the catalogue lists a branch named after its id.
The catalogue is where the ids are, so it is also the list of what to do: a branch the catalogue doesn't name is a branch nothing can reach, and giving it a second name wouldn't change that.
A package that fails doesn't stop the rest. What is created is created, and a second run picks up where this one got to, so the useful thing to report is everything that went wrong rather than the first of it.