{
  "env": "gc",
  "debug": true,
  "print_level": "info",
  "cluster": {
    "discovery": {
      "mode": "etcd",
      "@mode1": "mode=default,从profile-{x}.json读取node节点的配置数据",
      "@mode2": "mode=nats,通过nats->master_node_id获取已注册的节点",
      "@mode3": "mode=etcd,通过etcd同步已注册节点"
    },
    "nats": {
      "master_node_id": "m-master",
      "address": "nats://127.0.0.1:4222",
      "reconnect_delay": 1,
      "max_reconnects": 0,
      "request_timeout": 2,
      "user": "",
      "password": ""
    },
    "etcd": {
      "end_points": "127.0.0.1:2379",
      "@end_points": "dev.com:2379,dev1.com:2379",
      "prefix": "mhaya",
      "ttl": 5,
      "dial_timeout": 3,
      "dial_keep_alive_time": 1,
      "dial_keep_alive_timeout": 1,
      "user": "",
      "password": ""
    }
  },
  "node": {
    "master": [
      {
        "node_id": "m-master",
        "address": "",
        "__settings__": {
          "ref_logger": "master_log"
        },
        "enable": true
      }
    ],
    "center": [
      {
        "node_id": "m-center",
        "address": "",
        "__settings__": {
          "db_id_list": {
            "game_db_id": "game_db_1"
          },
          "ref_logger": "center_log"
        },
        "enable": true
      }
    ],
    "logstash": [
      {
        "node_id": "m-logstash",
        "address": "",
        "__settings__": {
          "db_id_list": {
            "logstash_db_id": "gc_logstash"
          },
          "ref_logger": "logstash_log"
        },
        "enable": true
      }
    ],
    "gate": [
      {
        "node_id": "m-gate-1",
        "address": "0.0.0.0:10010",
        "__settings__": {
          "db_id_list": {
            "game_db_id": "game_db_1"
          },
          "ref_logger": "gate_log"
        },
        "enable": true
      }
    ],
    "web": [
      {
        "node_id": "m-web-1",
        "address": "0.0.0.0:20000",
        "__settings__": {
          "db_id_list": {
            "game_db_id": "game_db_1"
          },
          "ref_logger": "web_log",
          "is_not_sign": true
        },
        "enable": true
      },
      {
        "node_id": "m-web-2",
        "address": "0.0.0.0:20001",
        "__settings__": {
          "db_id_list": {
            "game_db_id": "game_db_1"
          },
          "ref_logger": "web_log"
        },
        "enable": true
      }
    ],
    "web_admin": [
      {
        "node_id": "m-web-admin-1",
        "address": "0.0.0.0:30000",
        "__settings__": {
          "db_id_list": {
            "game_db_id": "game_db_1",
            "logstash_db_id": "gc_logstash"
          },
          "ref_logger": "web_admin_log",
          "open_ip_whitelist": false
        },
        "enable": true
      }
    ],
    "game": [
      {
        "node_id": "10001",
        "__settings__": {
          "db_id_list": {
            "game_db_id": "game_db_1"
          },
          "ref_logger": "game_log"
        },
        "enable": true
      },
      {
        "node_id": "10002",
        "__settings__": {
          "db_id_list": {
            "game_db_id": "game_db_1"
          },
          "ref_logger": "game_log"
        },
        "enable": true
      },
      {
        "node_id": "10003",
        "__settings__": {
          "db_id_list": {
            "game_db_id": "game_db_1"
          },
          "ref_logger": "game_log"
        },
        "enable": true
      },
      {
        "node_id": "10004",
        "__settings__": {
          "db_id_list": {
            "game_db_id": "game_db_1"
          },
          "ref_logger": "game_log"
        },
        "enable": true
      }
    ]
  },
  "logger": {
    "master_log": {
      "level": "debug",
      "enable_console": true,
      "enable_write_file": true,
      "file_link_path": "logs/master.log",
      "file_path_format": "logs/master_%Y%m%d%H%M.log"
    },
    "center_log": {
      "level": "debug",
      "enable_console": true,
      "enable_write_file": true,
      "file_link_path": "logs/center.log",
      "file_path_format": "logs/center_%Y%m%d%H%M.log"
    },
    "logstash_log": {
      "level": "debug",
      "enable_console": true,
      "enable_write_file": true,
      "file_link_path": "logs/logstash.log",
      "file_path_format": "logs/logstash_%Y%m%d%H%M.log"
    },
    "gate_log": {
      "level": "debug",
      "enable_console": true,
      "enable_write_file": true,
      "file_link_path": "logs/gate.log",
      "file_path_format": "logs/gate_%Y%m%d%H%M.log"
    },
    "game_log": {
      "level": "debug",
      "enable_console": true,
      "enable_write_file": true,
      "file_link_path": "logs/game.log",
      "file_path_format": "logs/game_%Y%m%d%H%M.log"
    },
    "web_log": {
      "level": "debug",
      "enable_console": true,
      "enable_write_file": true,
      "file_link_path": "logs/web.log",
      "file_path_format": "logs/web_%Y%m%d%H%M.log"
    },
    "web_admin_log": {
      "level": "debug",
      "enable_console": true,
      "enable_write_file": true,
      "file_link_path": "logs/web_admin_log.log",
      "file_path_format": "logs/web_admin_log_%Y%m%d%H%M.log"
    },
    "cross_log": {
      "level": "debug",
      "enable_console": true,
      "enable_write_file": true,
      "file_link_path": "logs/cross.log",
      "file_path_format": "logs/cross_%Y%m%d%H%M.log"
    }
  },
  "mongo": {
    "center_db_group": [
      {
        "enable": true,
        "db_id": "game_db_1",
        "db_name": "db_mhaya",
        "uri": "mongodb://127.0.0.1:27017"
      }
    ]
  },
  "db": {
    "logstash_db_group": [
      {
        "enable": true,
        "db_id": "gc_logstash",
        "db_type": "clickhouse",
        "dsn": "clickhouse://default:123456@localhost:9000/default?dial_timeout=10s&read_timeout=20s",
        "db_name": "default",
        "host": "192.168.0.193:9000",
        "user_name": "default",
        "password": "123456",
        "max_idle_connect": 4,
        "max_open_connect": 8,
        "log_mode": true
      }
    ]
  },
  "redis": {
    "address": "127.0.0.1:6379",
    "password": "",
    "db": 0
  },
  "data_config": {
    "parser": "json",
    "data_source": "file",
    "file": {
      "file_path": "data/",
      "ext_name": ".json",
      "reload_time": 3000
    },
    "redis": {
      "prefix_key": "data_config",
      "subscribe_key": "data_config_change",
      "address": "127.0.0.1:6379",
      "password": "",
      "db": 7
    }
  }
}