<commit_before>package config

import (
	"encoding/json"
	"io/ioutil"
)

type NodeConfig struct {
	Name             string `json:"name"`
	DownAfterNoAlive int    `json:"down_after_noalive"`
	IdleConns        int    `json:"idle_conns"`
	RWSplit          bool   `json:"rw_split"`

	User     string `json:"user"`
	Password string `json:"password"`

	Master string `json:"master"`
	Slave  string `json:"slave"`
}

type SchemaConfig struct {
	DB          string      `json:"db"`
	Nodes       []string    `json:"nodes"`
	RulesConifg RulesConfig `json:"rules"`
	CacheSize   int         `json:"cache_size"` //m
}

type RulesConfig struct {
	Default   string        `json:"default"`
	ShardRule []ShardConfig `json:"shard"`
}

type ShardConfig struct {
	Table        string `json:"table"`
	Key          string `json:"key"`
	RowCacheType string `json:"row_cache_type"`
	Node         string `json:"node"`
}

type Config struct {
	Addr     string `json:"addr"`<commit_msg>int->string<commit_after>package config

import (
	"encoding/json"
	"io/ioutil"
)

type NodeConfig struct {
	Name             string `json:"name"`
	DownAfterNoAlive int    `json:"down_after_noalive"`
	IdleConns        int    `json:"idle_conns"`
	RWSplit          bool   `json:"rw_split"`

	User     string `json:"user"`
	Password string `json:"password"`

	Master string `json:"master"`
	Slave  string `json:"slave"`
}

type SchemaConfig struct {
	DB          string      `json:"db"`
	Nodes       []string    `json:"nodes"`
	RulesConifg RulesConfig `json:"rules"`
	CacheSize   int         `json:"cache_size,string"` //m
}

type RulesConfig struct {
	Default   string        `json:"default"`
	ShardRule []ShardConfig `json:"shard"`
}

type ShardConfig struct {
	Table        string `json:"table"`
	Key          string `json:"key"`
	RowCacheType string `json:"row_cache_type"`
	Node         string `json:"node"`
}

type Config struct {
	Addr     string `json:"addr"`
{'fraction_non_alphanumeric': 0.12740509620384816, 'fraction_numerical': 0.0, 'mean_word_length': 3.128755364806867, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3660045', 'n_tokens_mistral': 627, 'n_tokens_neox': 624, 'n_words': 155}