Versions in this module Expand all Collapse all v0 v0.1.0 Jun 17, 2020 Changes in this version + const ConnReadTimeout + const ConnWriteTimeout + const RoundTripperNameRaftMessage + const RoundTripperNameSnapshot + var ErrExceedSizeLimit = errors.New("rafthttp: error limit exceeded") + var ProbingPrefix = path.Join(RaftPrefix, "probing") + var RaftPrefix = "/raft" + var RaftSnapshotPrefix = path.Join(RaftPrefix, "snapshot") + var RaftStreamPrefix = path.Join(RaftPrefix, "stream") + func NewListener(u url.URL, tlsinfo *transport.TLSInfo) (net.Listener, error) + func NewRoundTripper(tlsInfo transport.TLSInfo, dialTimeout time.Duration) (http.RoundTripper, error) + type Pausable interface + Pause func() + Resume func() + type Peer interface + type Raft interface + IsIDRemoved func(id uint64) bool + Process func(ctx context.Context, m raftpb.Message) error + ReportSnapshot func(id uint64, status raft.SnapshotStatus) + ReportUnreachable func(id uint64) + type Transport struct + ClusterID types.ID + DialRetryFrequency rate.Limit + DialTimeout time.Duration + ErrorC chan error + ID types.ID + LeaderStats *stats.LeaderStats + Raft Raft + ServerStats *stats.ServerStats + Snapshotter *snap.Snapshotter + TLSInfo transport.TLSInfo + URLs types.URLs + func (t *Transport) ActivePeers() (cnt int) + func (t *Transport) ActiveSince(id types.ID) time.Time + func (t *Transport) AddPeer(id types.ID, us []string) + func (t *Transport) AddRemote(id types.ID, us []string) + func (t *Transport) CutPeer(id types.ID) + func (t *Transport) Get(id types.ID) Peer + func (t *Transport) Handler() http.Handler + func (t *Transport) MendPeer(id types.ID) + func (t *Transport) Pause() + func (t *Transport) RemoveAllPeers() + func (t *Transport) RemovePeer(id types.ID) + func (t *Transport) Resume() + func (t *Transport) Send(msgs []raftpb.Message) + func (t *Transport) SendSnapshot(m snap.Message) + func (t *Transport) Start() error + func (t *Transport) Stop() + func (t *Transport) UpdatePeer(id types.ID, us []string) + type Transporter interface + ActivePeers func() int + ActiveSince func(id types.ID) time.Time + AddPeer func(id types.ID, urls []string) + AddRemote func(id types.ID, urls []string) + Handler func() http.Handler + RemoveAllPeers func() + RemovePeer func(id types.ID) + Send func(m []raftpb.Message) + SendSnapshot func(m snap.Message) + Start func() error + Stop func() + UpdatePeer func(id types.ID, urls []string) + func NewNopTransporter() Transporter + func NewSnapTransporter(snapDir string) (Transporter, <-chan snap.Message)