etcd: util: Move etcd utils into separate package

This commit is contained in:
James Shubin
2023-09-28 22:09:54 -04:00
parent 01f249d484
commit 0c751ea14f
7 changed files with 43 additions and 38 deletions

View File

@@ -24,6 +24,7 @@ import (
"strings"
"time"
etcdUtil "github.com/purpleidea/mgmt/etcd/util"
"github.com/purpleidea/mgmt/util"
"github.com/purpleidea/mgmt/util/errwrap"
@@ -116,7 +117,7 @@ func (obj *EmbdEtcd) runServer(newCluster bool, peerURLsMap etcdtypes.URLsMap) (
if len(obj.ServerURLs) > 0 {
peerURLs = obj.ServerURLs
}
initialPeerURLsMap, err := copyURLsMap(peerURLsMap)
initialPeerURLsMap, err := etcdUtil.CopyURLsMap(peerURLsMap)
if err != nil {
return errwrap.Wrapf(err, "error copying URLsMap")
}