Add readonly mode to catalog

This change includes a new `mode` concept to the catalog backend. This gives us
the handle to configure catalog in a `readonly` mode as discussed in #3348.

The new `catalog.mode` field configures that catalog in either `readwrite` or
`readonly`.

- `readwrite` is the current mode that allows users to register components at
  startup through `catalog.locations` and with eg. plugin `catalog-import`

- `readonly` is the new mode which, for now, disables the mutating `location`
  APIs

Signed-off-by: Crevil <bjoern.soerensen@gmail.com>
This commit is contained in:
Crevil
2021-03-19 14:18:42 +01:00
parent 38fcac8133
commit f1b2c1d2c2
7 changed files with 230 additions and 3 deletions
+1
View File
@@ -45,5 +45,6 @@ export default async function createPlugin(
higherOrderOperation,
locationAnalyzer,
logger: env.logger,
config: env.config,
});
}