code: func (s *Discovery) Initialize(uris string, heartbeat time.Duration, ttl time.Duration, clusterOpts map[string]string) error {
  	var (
  		parts = strings.SplitN(uris, "/", 2)
  		addrs = strings.Split(parts[0], ",")
  		err   error
  	)
  
  	// A custom prefix to the path can be optionally used.
  	if len(parts) == 2 {
  		s.prefix = parts[1]
  	}
  
  	s.heartbeat = heartbeat
  	s.ttl = ttl
  
  	// Use a custom path if specified in discovery options
  	dpath := defaultDiscoveryPath
  	if clusterOpts["kv.path"] != "" {
  		dpath = clusterOpts["kv.path"]
  	}
  
  	s.path = path.Join(s.prefix, dpath)
  
  	var config *store.Config
  	if clusterOpts["kv.cacertfile"] != "" && clusterOpts["kv.certfile"] != "" && clusterOpts["kv.keyfile"] != "" {
  		logrus.Info("Initializing discovery with TLS")
  		tlsConfig, err := tlsconfig.Client(tlsconfig.Options{
  			CAFile:   clusterOpts["kv.cacertfile"],
  			CertFile: clusterOpts["kv.certfile"],
  			KeyFile:  clusterOpts["kv.keyfile"],
  		})
  		if err != nil {
  			return err
  		}
  		config = &store.Config{
  			// Set ClientTLS to trigger https (bug in libkv/etcd)
  			ClientTLS: &store.ClientTLSConfig{
  				CACertFile: clusterOpts["kv.cacertfile"],
  				CertFile:   clusterOpts["kv.certfile"],
  				KeyFile:    clusterOpts["kv.keyfile"],
  			},
  			// The actual TLS config that will be used
  			TLS: tlsConfig,
  		}
  	} else {
  		logrus.Info("Initializing discovery without TLS")
  	}
  
  	// Creates a new store, will ignore options given
  	// if not supported by the chosen store
  	s.store, err = libkv.NewStore(s.backend, addrs, config)
  	return err
  }
docs: // Initialize is exported