aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/pkg/net.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2026-01-27 01:16:21 +0900
committerOphestra <cat@gensokyo.uk>2026-01-27 01:23:50 +0900
commiteb67e5e0a8821058fed782bf9c90b45c793036a5 (patch)
tree7c115251881b0832309967404206a417cfb332c7 /internal/pkg/net.go
parent948afe33e5006f7e37e24bbc69be2e527a07ddb3 (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/net.go')
-rw-r--r--internal/pkg/net.go7
1 files changed, 5 insertions, 2 deletions
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() }