From 8025da5a8daccf29697ae79da66570bcdd7be8be Mon Sep 17 00:00:00 2001 From: Brad Davidson Date: Wed, 23 Sep 2020 22:42:50 -0700 Subject: [PATCH] Remove dead EndpointName code According to @galal-hussein this is dead code that was probably brought over from Kine. I certainly couldn't figure out what it is supposed to be doing. Signed-off-by: Brad Davidson --- pkg/cluster/managed.go | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/pkg/cluster/managed.go b/pkg/cluster/managed.go index ab95dbf20f..47d33a0a5a 100644 --- a/pkg/cluster/managed.go +++ b/pkg/cluster/managed.go @@ -58,12 +58,6 @@ func (c *Cluster) initClusterDB(ctx context.Context, handler http.Handler) (http return handler, nil } - if !strings.HasPrefix(c.config.Datastore.Endpoint, c.managedDB.EndpointName()+"://") { - c.config.Datastore = endpoint.Config{ - Endpoint: c.managedDB.EndpointName(), - } - } - return c.managedDB.Register(ctx, c.config, handler) } @@ -77,13 +71,6 @@ func (c *Cluster) assignManagedDriver(ctx context.Context) error { } } - endpointType := strings.SplitN(c.config.Datastore.Endpoint, ":", 2)[0] - for _, driver := range managed.Registered() { - if endpointType == driver.EndpointName() { - c.managedDB = driver - return nil - } - } if c.config.Datastore.Endpoint == "" && (c.config.ClusterInit || (c.config.Token != "" && c.config.JoinURL != "")) { for _, driver := range managed.Registered() {