aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/pkg/net.go
AgeCommit message (Collapse)Author
13 hourspkg: move from internalHEADstagingmasterdevelopOphestra
Closes #43. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-07-23internal/pkg: optional executable filesOphestra
This enables a FileArtifact implementation to specify whether its resulting file should be executable. This change also implements shebang and ELF magic checks in the file artifact. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-07-02internal/pkg: rename inputs methodOphestra
Inputs is more correct than dependencies in the current terminology. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-02-05internal/pkg: standardise artifact IROphestra
This should hopefully provide good separation between the artifact curing backend implementation and the (still work in progress) language. Making the IR parseable also guarantees uniqueness of the representation. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-29internal/pkg: set User-Agent headerOphestra
Avoid living under the default user agent and be at the mercy of some IDS. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-27internal/pkg: exclusive artifactsOphestra
This alleviates scheduler overhead when curing many artifacts. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-25internal/pkg: expose response bodyOphestra
This uses the new measured reader provided by Cache. This should make httpArtifact zero-copy. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-25internal/pkg: expose underlying readerOphestra
This will be fully implemented in httpArtifact in a future commit. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-15internal/pkg: cache computed identifiersOphestra
This eliminates duplicate identifier computations. The new implementation also significantly reduces allocations while computing identifier for a large dependency tree. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-12internal/pkg: append user-facing name in messagesOphestra
This makes verbose messages much more useful. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-09internal/pkg: pass context to file cureOphestra
This removes the left over embedded contexts. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-09internal/pkg: move dependency flooding to cacheOphestra
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>
2026-01-06internal/pkg: update http checksum signatureOphestra
This was using the old pre-KnownChecksum function signature. It did not affect correctness since httpArtifact performs internal validation to avoid the strict mode vfs roundtrip, but it prevented content-addressed cache hits. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-06internal/pkg: pass cure context as single valueOphestra
This cleans up the function signature and makes backwards compatible API changes possible. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-05internal/pkg: temporary scratch space for cureOphestra
This allows for more flexibility during implementation. The use case that required this was for expanding single directory tarballs. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-05internal/pkg: compute http identifier from urlOphestra
The previous implementation exposes arbitrary user input to the cache as an identifier, which is highly error-prone and can cause the cache to enter an inconsistent state if the user is not careful. This change replaces the implementation to compute identifier late, using url string as params. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-05internal/pkg: improve artifact interfaceOphestra
This moves all cache I/O code to Cache. Artifact now only contains methods for constructing their actual contents. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-03internal/pkg: pass context in request wrapperOphestra
This method is for the most common use case, and in actual use there will always be an associated context. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-03internal/pkg: compute identifier from depsOphestra
This provides infrastructure for computing a deterministic identifier based on current artifact kind, opaque parameters data, and optional dependency kind and identifiers. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-03internal/pkg: implement http artifactOphestra
This is useful for downloading source tarballs from the internet. Signed-off-by: Ophestra <cat@gensokyo.uk>