A provider is a JSON object in the providers list that tells DotSlash how to fetch an artifact. DotSlash tries providers in the order they are listed until one succeeds. If you want to randomize the order (e.g., to use mirrors), add providers_order: "weighted-random" to the artifact entry. You can use a weight (integer $\ge 1$, defaults to $1$) to bias the selection.
Currently supported providers:
- HTTP Provider: Uses
curl to fetch via a URL. Requires the url field. - GitHub Release Provider: Uses the GitHub CLI (
gh) to fetch from a repository. Requires type, repo, tag, and name. This is useful for private repositories if gh is authenticated. - S3 Provider: Uses the
aws CLI to fetch from S3 or compatible stores. Requires type, repo (the bucket), key, and optionally region.
{
"format": "tar.gz",
"path": "hermes",
"providers": [
{"url": "https://primary.example.com/hermes.tar.gz", "weight": 3},
{"url": "https://mirror1.example.com/hermes.tar.gz", "weight": 1},
{"url": "https://mirror2.example.com/hermes.tar.gz", "weight": 1},
{"url": "https://mirror3.example.com/hermes.tar.gz", "weight": 1}
],
"providers_order": "weighted-random"
}