From eb67e5e0a8821058fed782bf9c90b45c793036a5 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Tue, 27 Jan 2026 01:16:21 +0900 Subject: internal/pkg: exclusive artifacts This alleviates scheduler overhead when curing many artifacts. Signed-off-by: Ophestra --- internal/pkg/file.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'internal/pkg/file.go') diff --git a/internal/pkg/file.go b/internal/pkg/file.go index 9e075cd5..c2093d6b 100644 --- a/internal/pkg/file.go +++ b/internal/pkg/file.go @@ -37,13 +37,16 @@ func NewFile(name string, data []byte) FileArtifact { } // Kind returns the hardcoded [Kind] constant. -func (a *fileArtifact) Kind() Kind { return KindFile } +func (*fileArtifact) Kind() Kind { return KindFile } // Params writes the result of Cure. func (a *fileArtifact) Params(ctx *IContext) { ctx.GetHash().Write(*a) } // Dependencies returns a nil slice. -func (a *fileArtifact) Dependencies() []Artifact { return nil } +func (*fileArtifact) Dependencies() []Artifact { return nil } + +// IsExclusive returns false: Cure returns a prepopulated buffer. +func (*fileArtifact) IsExclusive() bool { return false } // Checksum computes and returns the checksum of caller-supplied data. func (a *fileArtifact) Checksum() Checksum { -- cgit v1.3.1