Documentation ¶
Index ¶
Constants ¶
View Source
const ( DefaultAddr string = "127.0.0.1:6380" DefaultHttpAddr string = "127.0.0.1:11181" DefaultDBName string = "goleveldb" DefaultDataDir string = "./data" )
View Source
const ( MaxBinLogFileSize int = 1024 * 1024 * 1024 MaxBinLogFileNum int = 10000 DefaultBinLogFileSize int = MaxBinLogFileSize DefaultBinLogFileNum int = 10 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BinLogConfig ¶
type BinLogConfig struct { MaxFileSize int `toml:"max_file_size"` MaxFileNum int `toml:"max_file_num"` }
func (*BinLogConfig) Adjust ¶
func (cfg *BinLogConfig) Adjust()
type Config ¶
type Config struct { DataDir string `toml:"data_dir"` DBName string `toml:"db_name"` LevelDB LevelDBConfig `toml:"leveldb"` LMDB LMDBConfig `toml:"lmdb"` BinLog BinLogConfig `toml:"binlog"` SlaveOf string `toml:"slaveof"` AccessLog string `toml:"access_log"` }
func NewConfigDefault ¶
func NewConfigDefault() *Config
func NewConfigWithData ¶
func NewConfigWithFile ¶
type LMDBConfig ¶
type LevelDBConfig ¶
type LevelDBConfig struct { Compression bool `toml:"compression"` BlockSize int `toml:"block_size"` WriteBufferSize int `toml:"write_buffer_size"` CacheSize int `toml:"cache_size"` MaxOpenFiles int `toml:"max_open_files"` }
func (*LevelDBConfig) Adjust ¶
func (cfg *LevelDBConfig) Adjust()
Click to show internal directories.
Click to hide internal directories.