|
37 | 37 |
|
38 | 38 | #include <boost/range/adaptor/map.hpp> |
39 | 39 |
|
| 40 | +#ifndef ARCADIA_ROOT |
| 41 | +#include "generated/src/storages/redis/component.yaml.hpp" // Y_IGNORE |
| 42 | +#endif |
| 43 | + |
40 | 44 | USERVER_NAMESPACE_BEGIN |
41 | 45 |
|
42 | 46 | namespace { |
@@ -353,85 +357,7 @@ void Redis::OnSecdistUpdate(const storages::secdist::SecdistConfig& cfg) { |
353 | 357 | } |
354 | 358 |
|
355 | 359 | yaml_config::Schema Redis::GetStaticConfigSchema() { |
356 | | - return yaml_config::MergeSchemas<ComponentBase>(R"( |
357 | | -type: object |
358 | | -description: Redis client component |
359 | | -additionalProperties: false |
360 | | -properties: |
361 | | - thread_pools: |
362 | | - type: object |
363 | | - description: thread pools options |
364 | | - additionalProperties: false |
365 | | - properties: |
366 | | - redis_thread_pool_size: |
367 | | - type: integer |
368 | | - description: thread count to serve Redis requests |
369 | | - sentinel_thread_pool_size: |
370 | | - type: integer |
371 | | - description: thread count to serve sentinel requests |
372 | | - groups: |
373 | | - type: array |
374 | | - description: array of redis clusters to work with excluding subscribers |
375 | | - items: |
376 | | - type: object |
377 | | - description: redis cluster to work with excluding subscribers |
378 | | - additionalProperties: false |
379 | | - properties: |
380 | | - config_name: |
381 | | - type: string |
382 | | - description: key name in secdist with options for this cluster |
383 | | - db: |
384 | | - type: string |
385 | | - description: name to refer to the cluster in components::Redis::GetClient() |
386 | | - sharding_strategy: |
387 | | - type: string |
388 | | - description: one of RedisStandalone, RedisCluster, KeyShardCrc32, KeyShardTaximeterCrc32 or KeyShardGpsStorageDriver |
389 | | - defaultDescription: "KeyShardTaximeterCrc32" |
390 | | - enum: |
391 | | - - RedisCluster |
392 | | - - KeyShardCrc32 |
393 | | - - KeyShardTaximeterCrc32 |
394 | | - - KeyShardGpsStorageDriver |
395 | | - - RedisStandalone |
396 | | - allow_reads_from_master: |
397 | | - type: boolean |
398 | | - description: allows read requests from master instance |
399 | | - defaultDescription: false |
400 | | - metrics_level: |
401 | | - type: string |
402 | | - description: set metrics detail level |
403 | | - defaultDescription: "Instance" |
404 | | - enum: |
405 | | - - cluster |
406 | | - - shard |
407 | | - - instance |
408 | | - subscribe_groups: |
409 | | - type: array |
410 | | - description: array of redis clusters to work with in subscribe mode |
411 | | - items: |
412 | | - type: object |
413 | | - description: redis cluster to work with in subscribe mode |
414 | | - additionalProperties: false |
415 | | - properties: |
416 | | - config_name: |
417 | | - type: string |
418 | | - description: key name in secdist with options for this cluster |
419 | | - db: |
420 | | - type: string |
421 | | - description: name to refer to the cluster in components::Redis::GetSubscribeClient() |
422 | | - sharding_strategy: |
423 | | - type: string |
424 | | - description: either RedisCluster or KeyShardTaximeterCrc32 |
425 | | - defaultDescription: "KeyShardTaximeterCrc32" |
426 | | - enum: |
427 | | - - RedisCluster |
428 | | - - KeyShardTaximeterCrc32 |
429 | | - - RedisStandalone |
430 | | - allow_reads_from_master: |
431 | | - type: boolean |
432 | | - description: allows subscriptions to master instance to distribute load |
433 | | - defaultDescription: false |
434 | | -)"); |
| 360 | + return yaml_config::MergeSchemasFromResource<ComponentBase>("src/storages/redis/component.yaml"); |
435 | 361 | } |
436 | 362 |
|
437 | 363 | } // namespace components |
|
0 commit comments