feat(store): drift state, move candidates and service merge (#10)

Adds services.awaiting_inventory, Service.Drifted/RunsRef/RunningRef, AcceptRunning, MoveCandidates, MergeSources and MergeService, and maps a job for a deleted service to ErrNotFound.
This commit is contained in:
2026-10-13 10:28:34 +02:00
parent 307e46e4c7
commit 061243f5da
11 changed files with 1036 additions and 14 deletions
+9 -1
View File
@@ -2,7 +2,10 @@
// and digest.
package imageref
import "strings"
import (
"regexp"
"strings"
)
// Ref is an image reference split into its parts. Tag and Digest are empty
// when the reference has none.
@@ -41,3 +44,8 @@ func (r Ref) String() string {
}
return s
}
var digestPattern = regexp.MustCompile(`^sha256:[0-9a-f]{64}$`)
// IsDigest reports whether d is a well-formed sha256 digest.
func IsDigest(d string) bool { return digestPattern.MatchString(d) }