Module store

Source
Expand description

This module contains all things relating to the way redirects, vanity paths, and statistics are stored in links. For details about configuring each store backend, see that backend’s documentation.

Modules§

backend
This module contains a trait and its implementations for a unified redirect, vanity path, and statistics store used as links’ backend store.
memory 🔒
A fully in-memory StoreBackend implementation, storing all data in RAM with no other backups. This is mostly intended for tests, as it doesn’t depend on any state being persisted between links shutdown and startup, nor does it depend on any external resources or services.
redis 🔒
A Redis-backed StoreBackend implementation, storing all data on a Redis server at the provided address. This store backend is recommended for most situations, as the data is stored in a persistent* and distributed*, but still very high-performance way, which also allows any* number of links instances to connect and share the same underlying data source.

Structs§

Current
A holder for a Store, which allows the store to be updated on the fly.
Memory
A fully in-memory StoreBackend implementation useful for testing. Not recommended for production, as this lacks any data persistence or backups.
Redis
A Redis-backed StoreBackend implementation. The best option for most links deployments.
Store
A wrapper around any StoreBackend, providing access to the underlying store along some with extra things like logging.

Enums§

BackendType
The type of store backend used by the links redirector server. All variants must have a canonical human-readable string representation using only ‘a’-‘z’, ‘0’-‘9’, and ‘_’.