code: func New(logger log.Logger, conf *SDConfig) (*Discovery, error) {
  	tls, err := config_util.NewTLSConfig(&conf.TLSConfig)
  	if err != nil {
  		return nil, err
  	}
  
  	transport := &http.Transport{
  		TLSClientConfig: tls,
  		DialContext: conntrack.NewDialContextFunc(
  			conntrack.DialWithTracing(),
  			conntrack.DialWithName("triton_sd"),
  		),
  	}
  	client := &http.Client{Transport: transport}
  
  	d := &Discovery{
  		client:   client,
  		interval: time.Duration(conf.RefreshInterval),
  		sdConfig: conf,
  	}
  	d.Discovery = refresh.NewDiscovery(
  		logger,
  		"triton",
  		time.Duration(conf.RefreshInterval),
  		d.refresh,
  	)
  	return d, nil
  }
docs: // New returns a new Discovery which periodically refreshes its targets.