From f7124667145d1f7c614d9fc644bc07bb6174454a Mon Sep 17 00:00:00 2001 From: Ophestra Date: Fri, 9 Jan 2026 01:51:39 +0900 Subject: internal/pkg: move dependency flooding to cache This imposes a hard upper limit to concurrency during dependency satisfaction and moves all dependency-related code out of individual implementations of Artifact. This change also includes ctx and msg as part of Cache. Signed-off-by: Ophestra --- internal/pkg/net.go | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'internal/pkg/net.go') diff --git a/internal/pkg/net.go b/internal/pkg/net.go index 8164d7ce..3415b6d1 100644 --- a/internal/pkg/net.go +++ b/internal/pkg/net.go @@ -6,7 +6,6 @@ import ( "io" "net/http" "sync" - "syscall" ) // An httpArtifact is an [Artifact] backed by a [http] url string. The method is @@ -100,14 +99,9 @@ func (a *httpArtifact) do() (data []byte, err error) { return } -// Cure returns syscall.ENOTSUP. Callers should use Data instead. -func (a *httpArtifact) Cure(*CureContext) error { - return syscall.ENOTSUP -} - -// Data completes the http request and returns the resulting response body read +// Cure completes the http request and returns the resulting response body read // to EOF. Data does not interact with the filesystem. -func (a *httpArtifact) Data() (data []byte, err error) { +func (a *httpArtifact) Cure() (data []byte, err error) { a.mu.Lock() defer a.mu.Unlock() -- cgit v1.3.1