Every command
oas index serve
Run an index: follow every open swarm on a list of hosts, check it as a bridge does, and serve it as JSON.
$ oas index serve [flags]
It keeps one replica per open, listed swarm under --dir, reads the hosts' catalogs again every --refresh, and serves the read-only Index API this site is drawn from, described by its own OpenAPI document at /v1/openapi.json.
Give the hosts with --hosts-file, read at every refresh, or --hosts, or both. It reads the hosts' logs and members' files and writes nothing to any of them.
Flags
Each takes one dash or two, and its value after a space or =. A switch is on by itself, or =false.
data folder: one replica per open swarm
Default
oas-indexcomma-separated host URLs, in addition to the file
the curated host list (registry/hosts.json), read at every refresh
listen address
Default
:8094the longest the count of who holds a repository's lines rests after a file, resting as long as the file took (0: none)
Default
2show often to read the hosts' catalogs again
Default
1m0s
Examples
The index behind this site, on the public list.
$ oas index serve --dir /var/lib/oas/index --hosts-file registry/hosts.json --listen :8094
On one machine, beside a test host.
$ oas index serve --dir ./oas-index --hosts http://127.0.0.1:8080 --refresh 10s
See also
Read from the CLI: each flag's type, default and usage are its flag set's own, and a test fails when this page and the code disagree.