forked from rosa/hakurei
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>
This commit is contained in:
@@ -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() {}
|
||||
|
||||
Reference in New Issue
Block a user