code: func NewDiscovery(cfg *SDConfig, logger log.Logger) *Discovery {
  	if logger == nil {
  		logger = log.NewNopLogger()
  	}
  	d := &Discovery{
  		cfg:    cfg,
  		port:   cfg.Port,
  		logger: logger,
  	}
  	d.Discovery = refresh.NewDiscovery(
  		logger,
  		"azure",
  		time.Duration(cfg.RefreshInterval),
  		d.refresh,
  	)
  	return d
  }
docs: // NewDiscovery returns a new AzureDiscovery which periodically refreshes its targets.