mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
rafthttp: remove raftPrefix
This commit is contained in:
parent
2193b70fb3
commit
d2c7a7e5cb
@ -14,10 +14,6 @@ import (
|
||||
"github.com/coreos/etcd/Godeps/_workspace/src/golang.org/x/net/context"
|
||||
)
|
||||
|
||||
const (
|
||||
raftPrefix = "/raft"
|
||||
)
|
||||
|
||||
type Raft interface {
|
||||
Process(ctx context.Context, m raftpb.Message) error
|
||||
}
|
||||
@ -119,7 +115,7 @@ func (t *transport) AddPeer(id types.ID, urls []string) {
|
||||
if err != nil {
|
||||
log.Panicf("unexpect peer url %s", peerURL)
|
||||
}
|
||||
u.Path = path.Join(u.Path, raftPrefix)
|
||||
u.Path = path.Join(u.Path, RaftPrefix)
|
||||
fs := t.leaderStats.Follower(id.String())
|
||||
t.peers[id] = NewPeer(t.roundTripper, u.String(), id, t.clusterID,
|
||||
t.raft, fs, t.shouldstop)
|
||||
@ -144,7 +140,7 @@ func (t *transport) UpdatePeer(id types.ID, urls []string) {
|
||||
if err != nil {
|
||||
log.Panicf("unexpect peer url %s", peerURL)
|
||||
}
|
||||
u.Path = path.Join(u.Path, raftPrefix)
|
||||
u.Path = path.Join(u.Path, RaftPrefix)
|
||||
t.peers[id].Update(u.String())
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user