|
Clio
develop
The XRP Ledger API server.
|
Clio configuration: definitions of the supported keys, their types, constraints and defaults, and views for reading the parsed values. More...
Classes | |
| class | Array |
| Array definition to store multiple values provided by the user from Json/Yaml. More... | |
| class | ArrayView |
| View for array structure for config. More... | |
| class | ClioConfigDefinition |
| All the config data will be stored and extracted from this class. More... | |
| struct | ClioConfigDescription |
| All the config description are stored and extracted from this class. More... | |
| class | ConfigFileInterface |
| The interface for configuration files. More... | |
| class | ConfigFileJson |
| Json representation of config. More... | |
| class | ConfigValue |
| Represents the config values for Json/Yaml config. More... | |
| class | Constraint |
| An interface to enforce constraints on certain values within ClioConfigDefinition. More... | |
| struct | Error |
| Displays the different errors when parsing user config. More... | |
| class | NumberValueConstraint |
| A constraint class to ensure an integer value is between two numbers (inclusive). More... | |
| class | ObjectView |
| Provides a view into a subset of configuration data defined by a prefix. More... | |
| class | OneOf |
| A constraint class to ensure the provided value is one of the specified values in an array. More... | |
| class | PortConstraint |
| A constraint to ensure the port number is within a valid range. More... | |
| class | PositiveDouble |
| A constraint to ensure a number (int or double) is non-negative. More... | |
| class | RpcNameConstraint |
| A constraint to ensure the value is a valid RPC command name. More... | |
| class | ValidIPConstraint |
| A constraint to ensure the value is a valid IP address or hostname. More... | |
| class | ValueView |
| Provides view into ConfigValues that represents values in Clio Config. More... | |
Typedefs | |
| using | Value = std::variant<int64_t, std::string, bool, double> |
| Represents the supported Config Values. | |
Enumerations | |
| enum class | ConfigType { Integer , String , Double , Boolean } |
| Custom clio config types. More... | |
Functions | |
| std::ostream & | operator<< (std::ostream &stream, Array arr) |
| Custom output stream for Array. | |
| ClioConfigDefinition & | getClioConfig () |
| Full Clio Configuration definition. | |
| std::ostream & | operator<< (std::ostream &stream, ConfigType type) |
| Prints the specified config type to output stream. | |
| std::ostream & | operator<< (std::ostream &stream, Value value) |
| Prints the specified value to output stream. | |
| template<typename Type> | |
| constexpr ConfigType | getType () |
| Get the corresponding clio config type. | |
Variables | |
| static constexpr std::array< std::string_view, 6 > | kLogLevels |
| specific values that are accepted for logger levels in config. | |
| static constexpr std::array< std::string_view, 5 > | kLogTags |
| specific values that are accepted for logger tag style in config. | |
| static constexpr std::array< std::string_view, 3 > | kLoadCacheMode |
| specific values that are accepted for cache loading in config. | |
| static constexpr std::array< std::string_view, 1 > | kDatabaseType = {"cassandra"} |
| specific values that are accepted for database type in config. | |
| static constexpr std::array< std::string_view, 2 > | kProcessingPolicy = {"parallel", "sequent"} |
| specific values that are accepted for server's processing_policy in config. | |
| static constexpr std::array< std::string_view, 2 > | kProvider = {"cassandra", "aws_keyspace"} |
| specific values that are accepted for database provider in config. | |
| static constinit PortConstraint | gValidatePort {} |
| Validates a network port number. | |
| static constinit ValidIPConstraint | gValidateIp {} |
| Validates an IP address or hostname. | |
| static constinit OneOf | gValidateChannelName {"channel", Logger::kChannels} |
| Validates a log channel name. | |
| static constinit OneOf | gValidateLogLevelName {"log.level", kLogLevels} |
| Validates a log level name. | |
| static constinit OneOf | gValidateCassandraName {"database.type", kDatabaseType} |
| Validates the database type. | |
| static constinit OneOf | gValidateLoadMode {"cache.load", kLoadCacheMode} |
| Validates the cache load mode. | |
| static constinit OneOf | gValidateLogTag {"log.tag_style", kLogTags} |
| Validates the log tag style. | |
| static constinit OneOf | gValidateProcessingPolicy {"server.processing_policy", kProcessingPolicy} |
| Validates the server request processing policy. | |
| static constinit OneOf | gValidateProvider {"database.cassandra.provider", kProvider} |
| Validates the Cassandra-compatible database provider. | |
| static constinit PositiveDouble | gValidatePositiveDouble {} |
| Validates a number is non-negative. | |
| static constinit NumberValueConstraint< uint16_t > | gValidateNumMarkers {1, 256} |
| Validates the number of markers used for the initial ledger load; must be in [1, 256]. | |
| static constinit NumberValueConstraint< uint16_t > | gValidateNumCursors |
| Validates a number of cache loading cursors; any uint16 value, including 0. | |
| static constinit NumberValueConstraint< uint16_t > | gValidateReplicationFactor |
| Validates the database replication factor; 0 is allowed. | |
| static constinit NumberValueConstraint< uint16_t > | gValidateUint16 |
| Validates a positive (non-zero) uint16 value. | |
| static constinit NumberValueConstraint< uint32_t > | gValidateUint32 |
| Validates a positive (non-zero) uint32 value. | |
| static constinit NumberValueConstraint< uint32_t > | gValidateNonNegativeUint32 |
| Validates a non-negative uint32 value (0 is allowed). | |
| static constinit NumberValueConstraint< uint32_t > | gValidateApiVersion |
| Validates an API version; must be within the supported range of API versions. | |
| static constinit RpcNameConstraint | gRpcNameConstraint {} |
| Validates that a value is a valid RPC command name. | |
Clio configuration: definitions of the supported keys, their types, constraints and defaults, and views for reading the parsed values.
|
strong |
| ClioConfigDefinition & util::config::getClioConfig | ( | ) |
Full Clio Configuration definition.
Specifies which keys are valid in Clio Config and provides default values if user's do not specify one. Those without default values must be present in the user's config file.
|
constexpr |
Get the corresponding clio config type.
| Type | The type to get the corresponding ConfigType for |
|
inline |
| std::ostream & util::config::operator<< | ( | std::ostream & | stream, |
| ConfigType | type ) |
Prints the specified config type to output stream.
| stream | The output stream |
| type | The config type |
| std::ostream & util::config::operator<< | ( | std::ostream & | stream, |
| Value | value ) |
Prints the specified value to output stream.
| stream | The output stream |
| value | The value type |
|
staticconstinit |
Validates an API version; must be within the supported range of API versions.
|
staticconstinit |
Validates a non-negative uint32 value (0 is allowed).
|
staticconstinit |
Validates a number of cache loading cursors; any uint16 value, including 0.
|
staticconstinit |
Validates the database replication factor; 0 is allowed.
|
staticconstinit |
Validates a positive (non-zero) uint16 value.
|
staticconstinit |
Validates a positive (non-zero) uint32 value.
|
staticconstexpr |
specific values that are accepted for cache loading in config.
|
staticconstexpr |
specific values that are accepted for logger levels in config.
|
staticconstexpr |
specific values that are accepted for logger tag style in config.