Explorar o código

rafthttp: make newRemote simpler

Xiang Li %!s(int64=9) %!d(string=hai) anos
pai
achega
ba68d7bbe6
Modificáronse 2 ficheiros con 2 adicións e 2 borrados
  1. 1 1
      rafthttp/remote.go
  2. 1 1
      rafthttp/transport.go

+ 1 - 1
rafthttp/remote.go

@@ -25,7 +25,7 @@ type remote struct {
 	pipeline *pipeline
 }
 
-func startRemote(tr *Transport, urls types.URLs, local, to, cid types.ID, r Raft, errorc chan error) *remote {
+func startRemote(tr *Transport, urls types.URLs, to types.ID, r Raft, errorc chan error) *remote {
 	picker := newURLPicker(urls)
 	status := newPeerStatus(to)
 	pipeline := &pipeline{

+ 1 - 1
rafthttp/transport.go

@@ -225,7 +225,7 @@ func (t *Transport) AddRemote(id types.ID, us []string) {
 	if err != nil {
 		plog.Panicf("newURLs %+v should never fail: %+v", us, err)
 	}
-	t.remotes[id] = startRemote(t, urls, t.ID, id, t.ClusterID, t.Raft, t.ErrorC)
+	t.remotes[id] = startRemote(t, urls, id, t.Raft, t.ErrorC)
 }
 
 func (t *Transport) AddPeer(id types.ID, us []string) {