Documentation ¶
Index ¶
- Variables
- func NewChanTransport(nhConfig config.NodeHostConfig, requestHandler raftio.RequestHandler, ...) raftio.IRaftRPC
- type ChanConnection
- type ChanSSConnection
- type ChanTransport
- func (ct *ChanTransport) GetConnection(ctx context.Context, target string) (raftio.IConnection, error)
- func (ct *ChanTransport) GetSnapshotConnection(ctx context.Context, target string) (raftio.ISnapshotConnection, error)
- func (ct *ChanTransport) Name() string
- func (ct *ChanTransport) Start() error
- func (ct *ChanTransport) Stop()
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrClosed indicates that the connection has been closed. ErrClosed = errors.New("connection closed") // ErrFailedToConnect indicates that connecting to the remote failed. ErrFailedToConnect = errors.New("failed to connect") )
Functions ¶
func NewChanTransport ¶
func NewChanTransport(nhConfig config.NodeHostConfig, requestHandler raftio.RequestHandler, chunkHandler raftio.IChunkHandler) raftio.IRaftRPC
NewChanTransport creates a new channel based test transport module.
Types ¶
type ChanConnection ¶
type ChanConnection struct {
// contains filtered or unexported fields
}
ChanConnection is a channel based connection.
func (*ChanConnection) SendMessageBatch ¶
func (cc *ChanConnection) SendMessageBatch(batch pb.MessageBatch) error
SendMessageBatch ...
type ChanSSConnection ¶
type ChanSSConnection struct {
// contains filtered or unexported fields
}
ChanSSConnection is a channel based snapshot connection.
type ChanTransport ¶
type ChanTransport struct {
// contains filtered or unexported fields
}
ChanTransport is a channel based transport module used for testing purposes.
func (*ChanTransport) GetConnection ¶
func (ct *ChanTransport) GetConnection(ctx context.Context, target string) (raftio.IConnection, error)
GetConnection ...
func (*ChanTransport) GetSnapshotConnection ¶
func (ct *ChanTransport) GetSnapshotConnection(ctx context.Context, target string) (raftio.ISnapshotConnection, error)
GetSnapshotConnection ...
Click to show internal directories.
Click to hide internal directories.