code: func NewServer(address string, handler Handler, opts Options) Server {
  	instrumentOpts := opts.InstrumentOptions()
  	scope := instrumentOpts.MetricsScope()
  
  	s := &server{
  		address:                      address,
  		log:                          instrumentOpts.Logger(),
  		retryOpts:                    opts.RetryOptions(),
  		reportInterval:               instrumentOpts.ReportInterval(),
  		tcpConnectionKeepAlive:       opts.TCPConnectionKeepAlive(),
  		tcpConnectionKeepAlivePeriod: opts.TCPConnectionKeepAlivePeriod(),
  		closedChan:                   make(chan struct{}),
  		metrics:                      newServerMetrics(scope),
  		handler:                      handler,
  	}
  
  	// Set up the connection functions.
  	s.addConnectionFn = s.addConnection
  	s.removeConnectionFn = s.removeConnection
  
  	// Start reporting metrics.
  	go s.reportMetrics()
  
  	return s
  }
docs: // NewServer creates a new server.