Documentation ¶
Index ¶
- type HeartbeatStream
- func (s HeartbeatStream) BindStream(storeID uint64, stream opt.HeartbeatStream)
- func (s HeartbeatStream) Recv() *pdpb.RegionHeartbeatResponse
- func (s HeartbeatStream) Send(m *pdpb.RegionHeartbeatResponse) error
- func (s HeartbeatStream) SendMsg(region *core.RegionInfo, msg *pdpb.RegionHeartbeatResponse)
- type HeartbeatStreams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HeartbeatStream ¶
type HeartbeatStream struct {
// contains filtered or unexported fields
}
HeartbeatStream is used to mock HeartbeatStream for test use.
func NewHeartbeatStream ¶
func NewHeartbeatStream() HeartbeatStream
NewHeartbeatStream creates a new HeartbeatStream.
func (HeartbeatStream) BindStream ¶
func (s HeartbeatStream) BindStream(storeID uint64, stream opt.HeartbeatStream)
BindStream mock method.
func (HeartbeatStream) Recv ¶
func (s HeartbeatStream) Recv() *pdpb.RegionHeartbeatResponse
Recv mocks method.
func (HeartbeatStream) Send ¶
func (s HeartbeatStream) Send(m *pdpb.RegionHeartbeatResponse) error
Send mocks method.
func (HeartbeatStream) SendMsg ¶
func (s HeartbeatStream) SendMsg(region *core.RegionInfo, msg *pdpb.RegionHeartbeatResponse)
SendMsg is used to send the message.
type HeartbeatStreams ¶
type HeartbeatStreams struct {
// contains filtered or unexported fields
}
HeartbeatStreams is used to mock heartbeatstreams for test use.
func NewHeartbeatStreams ¶
func NewHeartbeatStreams(clusterID uint64, noNeedRun bool) *HeartbeatStreams
NewHeartbeatStreams creates a new HeartbeatStreams.
func (*HeartbeatStreams) BindStream ¶
func (mhs *HeartbeatStreams) BindStream(storeID uint64, stream opt.HeartbeatStream)
BindStream mock method.
func (*HeartbeatStreams) MsgCh ¶
func (mhs *HeartbeatStreams) MsgCh() chan *pdpb.RegionHeartbeatResponse
MsgCh returns the internal channel which contains the heartbeat responses from PD. It can be used to inspect the content of a PD response
func (*HeartbeatStreams) SendMsg ¶
func (mhs *HeartbeatStreams) SendMsg(region *core.RegionInfo, msg *pdpb.RegionHeartbeatResponse)
SendMsg is used to send the message.
Click to show internal directories.
Click to hide internal directories.