diff options
| author | Ophestra <cat@gensokyo.uk> | 2026-01-27 01:16:21 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2026-01-27 01:23:50 +0900 |
| commit | eb67e5e0a8821058fed782bf9c90b45c793036a5 (patch) | |
| tree | 7c115251881b0832309967404206a417cfb332c7 /internal/pkg/file.go | |
| parent | 948afe33e5006f7e37e24bbc69be2e527a07ddb3 (diff) | |
internal/pkg: exclusive artifacts
This alleviates scheduler overhead when curing many artifacts.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/pkg/file.go')
| -rw-r--r-- | internal/pkg/file.go | 7 |
1 files changed, 5 insertions, 2 deletions
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 { |
