Skip to content
Snippets Groups Projects
Commit 6c0987db authored by Thibault Allançon's avatar Thibault Allançon
Browse files

docs: configuration: update with most recent changes

parent bf87c60d
No related branches found
No related tags found
No related merge requests found
......@@ -14,36 +14,44 @@ The configuration file location is subject to the `XDG Base Directory
well as explicitly overridden on the :ref:`command line <swh-fuse-cli>` via the
``-C/--config-file`` flag.
The following sub-sections and fields can be used within the `swh > fuse`
The following sub-sections and fields can be used within the ``swh > fuse``
stanza:
- ``cache``:
- ``metadata``: where to store the metadata cache, must have either a
``in-memory`` boolean entry or a ``path`` string entry (with the
corresponding disk path)
``in-memory`` boolean entry set to true or a ``path`` string entry (with the
corresponding disk path).
- ``blob``: where to store the blob cache, same entries as the ``metadata``
cache
cache.
- ``direntry``: how much memory should be used by the direntry cache,
specified using a ``maxram`` entry (either as a percentage of available RAM,
or with disk storage unit suffixes: ``B``, ``KB``, ``MB``, ``GB``).
- ``web-api``:
- ``url``: archive API URL
- ``auth-token``: authentication token used with the API URL
- ``json-indent``: number of spaces used to print JSON metadata files (setting
it to ``null`` disables indentation).
If no configuration is given, default values are:
- ``cache``: all cache files are stored in ``$XDG_CACHE_HOME/swh/fuse/`` (or
``~/.cache/swh/fuse`` if ``XDG_CACHE_HOME`` is not set)
- ``web-api``: default URL is <https://archive.softwareheritage.org/api/1/>,
with no authentication token
``~/.cache/swh/fuse`` if ``XDG_CACHE_HOME`` is not set). The direntry cache
will use at most 10% of available RAM.
- ``web-api``: URL is https://archive.softwareheritage.org/api/1/, with no
authentication token
- ``json-indent``: 2 spaces.
Example
-------
Here is a full ``~/.config/swh/global.yml`` example, showcasing different cache
storage strategies (in-memory for metadata and on-disk for blob), using the
default Web API service:
storage strategies (in-memory for metadata, on-disk for blob, 20% RAM for
direntry), using the default Web API service:
.. code:: yaml
......@@ -54,9 +62,11 @@ default Web API service:
in-memory: true
blob:
path: "/path/to/cache/blob.sqlite"
direntry:
maxram: 20%
web-api:
url: "https://archive.softwareheritage.org/api/1/"
auth-token: null
auth-token: eyJhbGciOiJIUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJhMTMxYTQ1My1hM2IyLTQwMTUtO...
Logging
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment