示例#1
0
文件: info.go 项目: samdolan/redeo
// newServerInfo creates a new server info container
func newServerInfo(config *Config, clients *clients) *ServerInfo {
	info := &ServerInfo{
		registry:    info.New(),
		startTime:   time.Now(),
		connections: info.NewCounter(),
		commands:    info.NewCounter(),
		clients:     clients,
	}
	return info.withDefaults(config)
}
示例#2
0
文件: info.go 项目: jameswei/xcodis
// newServerInfo creates a new server info container
func newServerInfo(config *Config) *ServerInfo {

	info := &ServerInfo{
		registry:    info.New(),
		startTime:   time.Now(),
		connections: info.NewCounter(),
		commands:    info.NewCounter(),
		clients:     make(map[uint64]*Client),
	}
	return info.withDefaults(config)
}