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/net.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'internal/pkg/net.go') diff --git a/internal/pkg/net.go b/internal/pkg/net.go index 00c2bc61..7e35cd8e 100644 --- a/internal/pkg/net.go +++ b/internal/pkg/net.go @@ -40,7 +40,7 @@ func NewHTTPGet( } // Kind returns the hardcoded [Kind] constant. -func (a *httpArtifact) Kind() Kind { return KindHTTPGet } +func (*httpArtifact) Kind() Kind { return KindHTTPGet } // Params writes the backing url string. Client is not represented as it does // not affect [Cache.Cure] outcome. @@ -49,7 +49,10 @@ func (a *httpArtifact) Params(ctx *IContext) { } // Dependencies returns a nil slice. -func (a *httpArtifact) Dependencies() []Artifact { return nil } +func (*httpArtifact) Dependencies() []Artifact { return nil } + +// IsExclusive returns false: Cure returns as soon as a response is received. +func (*httpArtifact) IsExclusive() bool { return false } // Checksum returns the caller-supplied checksum. func (a *httpArtifact) Checksum() Checksum { return a.checksum.Value() } -- cgit v1.3.1