Enable Athens to work in offline mode (#1717)

Co-authored-by: Aaron Schlesinger <70865+arschles@users.noreply.github.com>
This commit is contained in:
Marwan Sulaiman
2021-08-18 19:09:14 -04:00
committed by GitHub
parent 9b505e9ee0
commit 151c4922fb
10 changed files with 209 additions and 63 deletions
+15
View File
@@ -260,6 +260,21 @@ NoSumPatterns = []
# Env override: ATHENS_DOWNLOAD_MODE
DownloadMode = "sync"
# NetworkMode configures how Athens will return the results
# of the /list endpoint as it can be assembled from both its own
# storage and the upstream VCS.
#
# Note, that for better error messaging, this would also affect how other
# endpoints behave.
#
# Modes:
# 1. strict: merge VCS versions with storage versions, but fail if either of them fails.
# 2. offline: only get storage versions, never reach out to VCS.
# 3. fallback: only return storage versions, if VCS fails. Note this means that you may
# see inconsistent results since fallback mode does a best effort of giving you what's
# available at the time of requesting versions.
NetworkMode = "strict"
# DownloadURL is the URL that will be used if
# DownloadMode is set to "redirect"
# Env override: ATHENS_DOWNLOAD_URL