Files
mesh-delivery/modules/mesh-delivery-builder/internal/versions/again.go
T
jschoubben d6d15a5497 B4: the publish items travel on the work queue publishes, live first
The bucket publish-queue listed and reread itself before each send; its items
now ride the builder's work queue publishes, pulled per holder and class by
consumers the builder makes as it learns a holder, the live class first, a
failed send handed back with the pause, an item acknowledged when its publish
is heard and terminated when its build is withdrawn, superseded or dropped.
builder_publish_drop and builder_publish_first act through reasks after the
hand-act log; builder_publish_queue reads the queue through the runtime. The
old state's items are moved once at the start, then dropped through the bus
module.

Builds: design 47 H2 §793, §820; H-A-290, H-A-291, H-A-440, H-A-446 (2), H-A-448
2026-11-22 02:22:59 +01:00

42 lines
2.4 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, and PublishFirst puts it again as live and terminates the old (builder_publish_drop,
// builder_publish_first, design 47 H2 §793): the answer, or why not.
PublishDrop func(ctx context.Context, module, version, by, why string) (string, error)
PublishFirst 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)
}