Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
swh-fuse
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Antoine Lambert
swh-fuse
Commits
6c0987db
Commit
6c0987db
authored
4 years ago
by
Thibault Allançon
Browse files
Options
Downloads
Patches
Plain Diff
docs: configuration: update with most recent changes
parent
bf87c60d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
docs/configuration.rst
+20
-10
20 additions, 10 deletions
docs/configuration.rst
with
20 additions
and
10 deletions
docs/configuration.rst
+
20
−
10
View file @
6c0987db
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment