Clio develop
The XRP Ledger API server.
|
The register of migrators. It will dispatch the migration to the corresponding migrator. It also hold the shared pointer of backend, which is used by the migrators. More...
#include <MigratorsRegister.hpp>
Public Types | |
using | BackendType = Backend |
The backend type which is used by the migrators. | |
Public Member Functions | |
MigratorsRegister (std::shared_ptr< BackendType > backend) | |
Construct a new Migrators Register object. | |
void | runMigrator (std::string const &name, util::config::ObjectView const &config) |
Run the migration according to the given migrator's name. | |
std::vector< std::tuple< std::string, MigratorStatus > > | getMigratorsStatus () const |
Get the status of all the migrators. | |
MigratorStatus | getMigratorStatus (std::string const &name) const |
Get the status of a migrator by its name. | |
constexpr auto | getMigratorNames () const |
Get all registered migrators' names. | |
std::string | getMigratorDescription (std::string const &name) const |
Get the description of a migrator by its name. | |
std::optional< bool > | canMigratorBlockClio (std::string_view name) const |
Return if the given migrator can block Clio server. | |
The register of migrators. It will dispatch the migration to the corresponding migrator. It also hold the shared pointer of backend, which is used by the migrators.
Backend | The backend type |
MigratorType | The migrator types. It should be a concept of MigratorSpec and not have duplicate names. |
|
inline |
Construct a new Migrators Register object.
backend | The backend shared pointer |
|
inline |
Return if the given migrator can block Clio server.
name | The migrator's name |
|
inline |
Get the description of a migrator by its name.
name | The migrator's name |
|
inlineconstexpr |
Get all registered migrators' names.
|
inline |
Get the status of all the migrators.
|
inline |
Get the status of a migrator by its name.
name | The migrator's name to get the status |
|
inline |
Run the migration according to the given migrator's name.
name | The migrator's name |
config | The configuration of the migration |