With one consumer per holder an item has no class to move ahead of, so builder_publish_first, its mode and its act go. The verb publish-queue lists the items in stream order, the order the one consumer gives them, and its description says so. A holder is a module name, so one ending in -live or -again (an earlier release's class durable) is refused at the learn, said, instead of having another holder's durable deleted. Builds: design 47 H2 H-A-483 third addendum, §793
40 lines
2.2 KiB
Go
40 lines
2.2 KiB
Go
package versions
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"time"
|
|
)
|
|
|
|
// The tools' descriptions.
|
|
const (
|
|
FloorAgainDescription = "Refused for every name: the builder numbers nothing of its own and asks no floor (design 47 H H-A-159); " +
|
|
"a version is numbered by the reservation (design 47 G §369, builder_reserved). Kept until design 47 G §372 removes it with " +
|
|
"the state versions."
|
|
)
|
|
|
|
// Acts are the builder's hand acts on its versions, answered by its program (the tools bundle writes them to reasks).
|
|
type Acts struct {
|
|
Numberer *Numberer
|
|
// Reconsider looks at every module again, so a claim asks a name's floor.
|
|
Reconsider func(ctx context.Context)
|
|
// Republish queues the reserved versions builder_publish_again names (design 47 G §588): the versions it queued.
|
|
Republish func(ctx context.Context, module, version string) ([]string, error)
|
|
// DropOldForm drops a retired node from the old form's count by hand (builder_old_form): its answer, or why not.
|
|
DropOldForm func(ctx context.Context, node, by, why string, at time.Time) (string, error)
|
|
// ReserveDone reserves the next version for a done trunk build that reserved none and queues its publish (builder_reserve_done):
|
|
// its answer, or why not.
|
|
ReserveDone func(ctx context.Context, module, fp, by, why string, at time.Time) (string, error)
|
|
// DropReserved drops a module's reservation of one MAJOR.MINOR by hand (builder_reserved_drop): its answer, or why not.
|
|
DropReserved func(ctx context.Context, module, series, by, why string, at time.Time) (string, error)
|
|
// PublishDrop terminates one publish item (builder_publish_drop, design 47 H2 §793): the answer, or why not.
|
|
PublishDrop func(ctx context.Context, module, version, by, why string) (string, error)
|
|
}
|
|
|
|
// FloorAgain is builder_floor_again of name: refused, since the builder numbers nothing of its own and no claim asks a floor
|
|
// (design 47 H H-A-159; the reservation numbers, G §369). The tool stays until G §372 removes it with the state versions.
|
|
func (a Acts) FloorAgain(_ context.Context, name string) (string, error) {
|
|
return "", fmt.Errorf("the floor of %s is not asked: the builder numbers nothing of its own and asks no floor (design 47 H H-A-159); "+
|
|
"a version is numbered by the reservation (G §369, builder_reserved)", name)
|
|
}
|