github.com/wfusion/gofusion@v1.1.14/test/db/configs/app.yml (about)

     1  base:
     2    debug: false
     3    app: gofusion
     4    goroutine_pool:
     5      max_routine_amount: -1
     6  
     7    log:
     8      default:
     9        log_level: debug
    10        stacktrace_level: error
    11        shorter_filepath: true
    12        enable_console_output: true
    13        console_output_option:
    14          layout: console
    15        enable_file_output: false
    16        file_output_option:
    17          layout: json
    18          path: .
    19          name: gofusion.log
    20          rotation_max_age: 24h
    21          rotation_count: 10
    22          rotation_size: 100mib
    23          compress: false
    24  
    25    metrics:
    26      prometheus_push:
    27        type: prometheus
    28        mode: push
    29        interval: 1s
    30        endpoint:
    31          addresses: [ prometheus:9091 ]
    32        enable_service_label: true
    33        enable_internal_metrics: true
    34        enable_logger: true
    35        log_instance: default
    36  
    37    db:
    38      read:
    39        driver: mysql
    40        db: mysql
    41        host: mysql
    42        port: 3306
    43        user: root
    44        password: ci
    45        timeout: 5s
    46        read_timeout: 5s
    47        write_timeout: 5s
    48        max_idle_conns: 20
    49        max_open_conns: 20
    50        enable_logger: true
    51        logger_config:
    52          log_level: info
    53          slow_threshold: 500ms
    54        sharding:
    55        - table: model_with_sharding
    56          suffix:
    57          columns: [az_name]
    58          number_of_shards: 3
    59          sharding_key_expr:
    60        - table: model_with_sharding_extend
    61          suffix:
    62          columns: [az_name]
    63          number_of_shards: 3
    64          sharding_key_expr:
    65        - table: model_with_sharding_embed
    66          suffix:
    67          columns: [az_name]
    68          number_of_shards: 3
    69          sharding_key_expr:
    70        - table: model_with_sharding_ptr
    71          suffix: age%02d
    72          columns: [id, age]
    73          number_of_shards: 16
    74          sharding_key_expr: ((id & 255) << 8) | age
    75        - table: model_with_sharding_by_raw_value
    76          suffix:
    77          columns: [az_name]
    78          sharding_key_by_raw_value: true
    79          sharding_keys_for_migrating: ["az1", "az2", "az3", "az4"]
    80  
    81      write:
    82        driver: mysql
    83        db: mysql
    84        host: mysql
    85        port: 3306
    86        user: root
    87        password: ci
    88        timeout: 5s
    89        read_timeout: 5s
    90        write_timeout: 5s
    91        max_idle_conns: 20
    92        max_open_conns: 20
    93        enable_logger: true
    94        logger_config:
    95          log_level: info
    96          slow_threshold: 500ms
    97        sharding:
    98        - table: model_with_sharding
    99          suffix:
   100          columns: [az_name]
   101          number_of_shards: 3
   102          sharding_key_expr:
   103        - table: model_with_sharding_extend
   104          suffix:
   105          columns: [az_name]
   106          number_of_shards: 3
   107          sharding_key_expr:
   108        - table: model_with_sharding_embed
   109          suffix:
   110          columns: [az_name]
   111          number_of_shards: 3
   112          sharding_key_expr:
   113        - table: model_with_sharding_ptr
   114          suffix: age%02d
   115          columns: [id, age]
   116          number_of_shards: 16
   117          sharding_key_expr: ((id & 255) << 8) | age
   118        - table: model_with_sharding_by_raw_value
   119          suffix:
   120          columns: [az_name]
   121          sharding_key_by_raw_value: true
   122          sharding_keys_for_migrating: ["az1", "az2", "az3", "az4"]
   123  
   124      postgres:
   125        driver: postgres
   126        db: postgres
   127        host: postgres
   128        port: 5432
   129        user: postgres
   130        password: ci
   131        timeout: 5s
   132        read_timeout: 5s
   133        write_timeout: 5s
   134        max_idle_conns: 20
   135        max_open_conns: 20
   136        enable_logger: true
   137        logger_config:
   138          log_level: info
   139          slow_threshold: 500ms
   140        sharding:
   141          - table: model_with_sharding
   142            suffix:
   143            columns: [ az_name ]
   144            number_of_shards: 3
   145            sharding_key_expr:
   146          - table: model_with_sharding_extend
   147            suffix:
   148            columns: [ az_name ]
   149            number_of_shards: 3
   150            sharding_key_expr:
   151          - table: model_with_sharding_embed
   152            suffix:
   153            columns: [ az_name ]
   154            number_of_shards: 3
   155            sharding_key_expr:
   156          - table: model_with_sharding_ptr
   157            suffix: age%02d
   158            columns: [ id, age ]
   159            number_of_shards: 16
   160            sharding_key_expr: ((id & 255) << 8) | age
   161          - table: model_with_sharding_by_raw_value
   162            suffix:
   163            columns: [ az_name ]
   164            sharding_key_by_raw_value: true
   165            sharding_keys_for_migrating: [ "az1", "az2", "az3", "az4" ]
   166  
   167      opengauss:
   168        driver: postgres
   169        dialect: opengauss
   170        db: postgres
   171        host: opengauss
   172        port: 5433
   173        user: gaussdb
   174        password: openGauss@123
   175        timeout: 5s
   176        read_timeout: 5s
   177        write_timeout: 5s
   178        max_idle_conns: 2
   179        max_open_conns: 2
   180        enable_logger: true
   181        logger_config:
   182          log_level: info
   183          slow_threshold: 500ms
   184        sharding:
   185          - table: model_with_sharding
   186            suffix:
   187            columns: [ az_name ]
   188            number_of_shards: 3
   189            sharding_key_expr:
   190          - table: model_with_sharding_extend
   191            suffix:
   192            columns: [ az_name ]
   193            number_of_shards: 3
   194            sharding_key_expr:
   195          - table: model_with_sharding_embed
   196            suffix:
   197            columns: [ az_name ]
   198            number_of_shards: 3
   199            sharding_key_expr:
   200          - table: model_with_sharding_ptr
   201            suffix: age%02d
   202            columns: [ id, age ]
   203            number_of_shards: 16
   204            sharding_key_expr: ((id & 255) << 8) | age
   205          - table: model_with_sharding_by_raw_value
   206            suffix:
   207            columns: [ az_name ]
   208            sharding_key_by_raw_value: true
   209            sharding_keys_for_migrating: [ "az1", "az2", "az3", "az4" ]
   210  
   211      sqlserver:
   212        driver: sqlserver
   213        db: master
   214        host: sqlserver
   215        port: 1433
   216        user: SA
   217        password: MyPass@word
   218        timeout: 5s
   219        read_timeout: 5s
   220        write_timeout: 5s
   221        max_idle_conns: 20
   222        max_open_conns: 20
   223        enable_logger: true
   224        logger_config:
   225          log_level: info
   226          slow_threshold: 500ms
   227        sharding:
   228          - table: model_with_sharding
   229            suffix:
   230            columns: [ az_name ]
   231            number_of_shards: 3
   232            sharding_key_expr:
   233          - table: model_with_sharding_extend
   234            suffix:
   235            columns: [ az_name ]
   236            number_of_shards: 3
   237            sharding_key_expr:
   238          - table: model_with_sharding_embed
   239            suffix:
   240            columns: [ az_name ]
   241            number_of_shards: 3
   242            sharding_key_expr:
   243          - table: model_with_sharding_ptr
   244            suffix: age%02d
   245            columns: [ id, age ]
   246            number_of_shards: 16
   247            sharding_key_expr: ((id & 255) << 8) | age
   248          - table: model_with_sharding_by_raw_value
   249            suffix:
   250            columns: [ az_name ]
   251            sharding_key_by_raw_value: true
   252            sharding_keys_for_migrating: [ "az1", "az2", "az3", "az4" ]
   253  
   254      sqlite:
   255        driver: sqlite
   256        db: ./configs/sqlite.db
   257        timeout: 5s
   258        read_timeout: 5s
   259        write_timeout: 5s
   260        max_idle_conns: 20
   261        max_open_conns: 20
   262        enable_logger: true
   263        logger_config:
   264          log_level: info
   265          slow_threshold: 500ms
   266        sharding:
   267          - table: model_with_sharding
   268            suffix:
   269            columns: [ az_name ]
   270            number_of_shards: 3
   271            sharding_key_expr:
   272          - table: model_with_sharding_extend
   273            suffix:
   274            columns: [ az_name ]
   275            number_of_shards: 3
   276            sharding_key_expr:
   277          - table: model_with_sharding_embed
   278            suffix:
   279            columns: [ az_name ]
   280            number_of_shards: 3
   281            sharding_key_expr:
   282          - table: model_with_sharding_ptr
   283            suffix: age%02d
   284            columns: [ id, age ]
   285            number_of_shards: 16
   286            sharding_key_expr: ((id & 255) << 8) | age
   287          - table: model_with_sharding_by_raw_value
   288            suffix:
   289            columns: [ az_name ]
   290            sharding_key_by_raw_value: true
   291            sharding_keys_for_migrating: [ "az1", "az2", "az3", "az4" ]