package resolution import ( mcat "git.novox.be/novox/mesh-sdk/go/catalogue" ) // artifactSweepVerbs are the seat's verbs, with the controller's arguments so a caller changes only the seat it asks. func artifactSweepVerbs() []mcat.Verb { return []mcat.Verb{ {Name: "artifacts", Description: "Every artifact the mesh made that lives in its artifact store, each with its " + "repository, digest, kind (image or archive) and state: kept, and why (a want names it, or one of the five " + "newest builds of its module in the builder's log), eligible (made, kept for no reason, not yet let go), or " + "unrecorded (in the store and named by nothing the mesh made: never removed). Reads only.", Input: schema(map[string]string{ "repository": "only this repository's references, as / (the counts stay whole)", "collected": "\"true\": list the collected references too (counted always)", }, nil, "collected")}, {Name: "held", Description: "Whether the artifact store holds each reference given, asked with one HEAD each: " + "held, gone (the store answered 404) or unknown with why. The builder asks it before it reuses a done key. " + "Reads only.", Input: listed(schema(map[string]string{ "references": "the artifacts' references, artifact-store:////blobs/sha256:: a list, " + "or one text separated by commas", }, []string{"references"}), "references")}, {Name: "collect", Description: "The artifact store's sweep, now: what is eligible is let go of. Without confirm a " + "dry run: what would be let go, nothing held or deleted. With confirm and why: every kept archive held first, " + "then each eligible artifact let go of, oldest first, an index with the platform manifests no kept index " + "names, each deletion recorded in the hand-act log. Bounded by most (500 by default, at most 5000) and 45 " + "seconds; what is left is said. Never touches a digest the mesh did not make.", Input: schema(map[string]string{ "confirm": "\"true\": let go of what is eligible (needs why); without it nothing is done", "why": "with confirm: why, required and recorded", "most": "let go of at most this many (500 by default, at most 5000)", }, nil, "confirm")}, {Name: "mirrors", Description: "The bases the mesh copied into its artifact store, each kept (a kept build stood on " + "it), eligible (only builds no longer kept stood on it) or unrecorded (no build the builder's log holds stood on " + "it: never removed), by what the builder's log says each build stood on. Records nothing by hand.", Input: schema(map[string]string{}, nil)}, {Name: "images", Description: "Every container image one machine's want and have name, each with the resources " + "naming it: what the machine keeps when it prunes its images. Reads only.", Input: schema(map[string]string{"node": "the machine's name"}, []string{"node"})}, } }