mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
rafthttp: make newRemote simpler
This commit is contained in:
parent
efe0ee7e59
commit
ba68d7bbe6
@ -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{
|
||||
|
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user