~/.mirage/state. Each store below can move onto infrastructure you run, on
its own or together with the others.
Workspace state
Mirage creates this data, so none of your mounts, such as S3 or GitHub, has a copy. Thestore key sets where Mirage saves it.
To see command logs from many machines in one place, send them to an
OpenTelemetry backend as traces.
Caches
Copies of files and listings Mirage read from your mounts, kept to make the next read faster. If a cache is lost, the next read is just slower. Thecache and index keys sit next to store, not inside it.
A mount can also set its own
index, which replaces the workspace’s for
that mount.
What each backend gives you
Every store keeps its state byworkspace_id. Give the workspace a fixed id
whenever its state should be found again, after a restart or by another
process.
In Python and TypeScript,
SqlWorkspaceStateStore keeps the namespace,
sessions and jobs in SQLite or Postgres, so every process on the database
shares them. Command logs stay in each process’s memory. YAML has no sql
type.
One store or several
store.type sets one backend for all four stores. This config keeps the
workspace state on Redis. Redis holds no command logs, so they go to disk
under root, ~/.mirage/state by default.
workspace.yaml
store:
namespace, sessions, logs for command logs or execution for jobs. Here the command logs go to a disk path you choose:
- YAML
- Python
- TypeScript
workspace.yaml
Where you set it
One config describes a workspace, the same YAML on every surface. Python and TypeScript also take each store as a constructor argument, as each store’s page shows.- CLI
- HTTP
- Python
- TypeScript