diff options
| author | Ophestra <cat@gensokyo.uk> | 2026-01-09 01:51:39 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2026-01-09 05:20:34 +0900 |
| commit | f7124667145d1f7c614d9fc644bc07bb6174454a (patch) | |
| tree | 9585573da6d016a27ce7fd066b795f611d1ce877 /internal/pkg/net.go | |
| parent | f2430b5f5ef7ac0361d1c4976b7ec7bebaa15f63 (diff) | |
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 <cat@gensokyo.uk>
Diffstat (limited to 'internal/pkg/net.go')
| -rw-r--r-- | internal/pkg/net.go | 10 |
1 files changed, 2 insertions, 8 deletions
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() |
