Documentation
¶
Index ¶
Constants ¶
View Source
const ( TypeNode = "node" TypeCluster = "cluster" )
Variables ¶
View Source
var ( ErrConfigNotInit = errors.New("Config not init") ErrDuplicateInitConfig = errors.New("Duplicate init config!") )
Functions ¶
func CmdToUpper ¶
func CmdToUpper(list []string)
func InitConfig ¶
func InitConfig() error
Types ¶
type CacheS ¶
type CacheS struct {
Enable bool `mapstructure:"enable"`
// cache The maximum number of items in
MaxItemsSize int `mapstructure:"max_items_size"`
// cache Kv default expiration time (unit: milliseconds)
DefaultExpiration int `mapstructure:"default_expiration"`
// cache Expired KV cleaning cycle (unit: second)
CleanupInterval int `mapstructure:"cleanup_interval"`
}
type Config ¶
type Config struct {
Proxy ProxyS `mapstructure:"proxy"`
RedisDB RedisDBS `mapstructure:"redisdb"`
PprofDebug PprofDebugS `mapstructure:"pprof_debug"`
Log LogS `mapstructure:"log"`
IPWhiteList IPWhiteListS `mapstructure:"ip_white_list"`
Cache CacheS `mapstructure:"cache"`
IgnoreCMD IgnoreCMDS `mapstructure:"ignore_cmd"`
P2P P2PS `mapstructure:"p2p"`
}
type IPWhiteListS ¶
type IgnoreCMDS ¶
type P2PS ¶ added in v1.0.1
type P2PS struct {
Enable bool `mapstructure:"enable" json:"enable"`
ServiceDiscoveryID string `mapstructure:"service_discovery_id" json:"service_discovery_id"`
ServiceCommandTopic string `mapstructure:"service_command_topic" json:"service_command_topic"`
ServiceDiscoverMode string `mapstructure:"service_discover_mode" json:"service_discover_mode"`
}
type PprofDebugS ¶
type RedisDBS ¶
type RedisDBS struct {
// node、cluster
Type string `mapstructure:"type"`
StartNodes string `mapstructure:"start_nodes"`
// Connection timeout parameter of cluster nodes Unit: ms
ConnTimeOut int `mapstructure:"conn_timeout"`
// Cluster node read timeout parameter Unit: ms
ConnReadTimeOut int `mapstructure:"conn_read_timeout"`
// Cluster node write timeout parameter Unit: ms
ConnWriteTimeOut int `mapstructure:"conn_write_timeout"`
// Cluster node TCP idle survival time Unit: seconds
ConnAliveTimeOut int `mapstructure:"conn_alive_timeout"`
// The size of the TCP connection pool for each node in the cluster
ConnPoolSize int `mapstructure:"conn_pool_size"`
}
RedisClusterConf is redis cluster configure options
Click to show internal directories.
Click to hide internal directories.