diff options
| author | Ophestra <cat@gensokyo.uk> | 2026-06-20 01:03:28 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2026-06-20 01:03:28 +0900 |
| commit | a4fab678114b61c1c3473661577797ecf029514d (patch) | |
| tree | f86f898d05cb3d5861f9c13a0ebe81a2c8a41bd1 /internal/pkg/compress.go | |
| parent | ed5cdd38a40e0e121b8bc1c432bbb57ca584f798 (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/compress.go')
| -rw-r--r-- | internal/pkg/compress.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/internal/pkg/compress.go b/internal/pkg/compress.go index 6d69143b..838cd98a 100644 --- a/internal/pkg/compress.go +++ b/internal/pkg/compress.go @@ -25,6 +25,7 @@ type decompressArtifact struct { } var _ FileArtifact = new(decompressArtifact) +var _ CuresExempt = new(decompressArtifact) // decompressArtifactNamed embeds decompressArtifact for a [fmt.Stringer] stream. type decompressArtifactNamed struct { @@ -117,3 +118,7 @@ func (a *decompressArtifact) Cure(r *RContext) (io.ReadCloser, error) { return nil, os.ErrInvalid } } + +// CuresExempt exempts the cheap [KindDecompress] implementation often part of +// a [FileArtifact] pipeline. +func (*decompressArtifact) CuresExempt() {} |
