-
Notifications
You must be signed in to change notification settings - Fork 4
llard Service Specification
This document specifies the externally observable contract of the llard HTTP service: its request/response format and the guarantees a client may rely on. It does not describe internal mechanisms.
GET /v1/artifacts/<module>@<version>?<matrix query>
-
<module>— package module identifier (e.g.madler/zlib). -
<version>— version string (e.g.v1.3.1).
- A flat set of
key=valuepairs, in the natural shape of the LLAR matrix CLI (e.g.arch=amd64&os=linux&debug=false). - The query string is not a serialized
formula.Matrixand does not exposeRequireorOptions. - The mapping from query values to LLAR's internal matrix representation is owned by the LLAR build path and is not part of this wire protocol.
artifactKey = module + version + matrixStr
-
matrixStris the canonical LLAR matrix string for the selected values. - Query parameter order MUST NOT affect
artifactKey.
- Content type:
application/x-cmdjsonl. See github.com/qiniu/x/cmdjsonl for the line format (Command <space> JSON object, newline-delimited). - The response body is a stream of command lines, terminating in exactly one of:
- a completion command line carrying artifact metadata (download location, archive type, LLAR metadata, checksum), or
- an error command line describing the failure.
- Command lines are delivered incrementally as build progress occurs, not buffered until completion.
Each request corresponds to exactly one requested root artifact (module@version + matrix). It does not separately address dependency artifacts.
A request for a given artifactKey always terminates in the same completion artifact, regardless of:
- whether that artifact already existed before the request was made;
- whether the artifact was produced by this request, by a concurrent request, or by a prior request.
When a request requires a build (no existing artifact for artifactKey), the build resolves the full dependency graph for the requested module/version/matrix and may, as part of producing the root artifact, also cause artifacts for dependencies to become available for future requests addressing those dependencies' own artifactKeys.
| Condition | Response |
|---|---|
<module>@<version> cannot be resolved |
Error command line; no artifact is produced for artifactKey
|
| Build failure (root or any dependency required by the root build) | Error command line; no completion artifact is produced for the root's artifactKey
|
A request that ends in an error command line has no side effect observable to subsequent requests for the same artifactKey (i.e. it does not "poison" the key — a later request may succeed).
-
llar installclient behavior (download, checksum verification,.cache.jsonand install directory layout). - Internal representation of
formula.Matrixand the query-to-matrix mapping algorithm. -
cmdjsonlline format details — see github.com/qiniu/x/cmdjsonl. - Caching, routing, storage, and coordination mechanisms.