Exemplo n.º 1
0
// 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)
}
Exemplo n.º 2
0
// 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)
}