aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/pkg/file.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2026-06-20 01:03:28 +0900
committerOphestra <cat@gensokyo.uk>2026-06-20 01:03:28 +0900
commita4fab678114b61c1c3473661577797ecf029514d (patch)
treef86f898d05cb3d5861f9c13a0ebe81a2c8a41bd1 /internal/pkg/file.go
parented5cdd38a40e0e121b8bc1c432bbb57ca584f798 (diff)
internal/pkg: optionally exempt implementations from cures counter
This avoids holding up many slots with a long pipeline. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/pkg/file.go')
-rw-r--r--internal/pkg/file.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/internal/pkg/file.go b/internal/pkg/file.go
index 149ca817..18b85b82 100644
--- a/internal/pkg/file.go
+++ b/internal/pkg/file.go
@@ -11,6 +11,7 @@ import (
type fileArtifact []byte
var _ KnownChecksum = new(fileArtifact)
+var _ CuresExempt = new(fileArtifact)
// fileArtifactNamed embeds fileArtifact alongside a caller-supplied name.
type fileArtifactNamed struct {
@@ -79,3 +80,6 @@ func (a *fileArtifact) Checksum() Checksum {
func (a *fileArtifact) Cure(*RContext) (io.ReadCloser, error) {
return io.NopCloser(bytes.NewReader(*a)), nil
}
+
+// CuresExempt exempts the cheap [KindFile] implementation.
+func (*fileArtifact) CuresExempt() {}