distribution serves name-of: the reference it keeps an upstream copy under
The node-engine composes an upstream artifact's image from the holder's own name for the copy; distribution owns that naming (ParseSource, Source.Name), so it answers it on the image seat rather than another module repeating the rule. Builds: design 47 H2 H-A-513 second addendum
This commit is contained in:
@@ -364,6 +364,19 @@ func tools(v *holder.Verbs, windows kept[holder.Window], taken *asks) []stdio.To
|
||||
}
|
||||
return reg.MirrorAnswer{Digest: in.Digest, Reference: ref}, nil
|
||||
}},
|
||||
stdio.Tool{Name: holder.ImageSeat + "." + holder.VerbNameOf, Description: "The reference an outside image, as a manifest's from names it pinned by its digest, is kept under in the store (upstream/<host>/<path>@<digest> in the seat's form), the one mirror answers; reads only, asks no copy, refuses a from with no digest.",
|
||||
Input: obj(map[string]any{"from": s("<name>[:<tag>]@sha256:…")}, "from"),
|
||||
Run: func(args map[string]any) (any, error) {
|
||||
in, err := arg[reg.NameOfInput](args)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
ref, err := v.NameOf(holder.ImageSeat, in.From)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return reg.NameOfAnswer{Reference: ref}, nil
|
||||
}},
|
||||
stdio.Tool{Name: "registry_health", Description: "distribution's health check, run by the runtime each minute: versions of each seat asked through the store's read side (the program's port 5100); fails naming the program when it does not answer.",
|
||||
Input: obj(map[string]any{}),
|
||||
Run: func(map[string]any) (any, error) {
|
||||
|
||||
Reference in New Issue
Block a user