Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContainerResolver ¶
ContainerResolver container resolver func
type Option ¶
type Option func(*options)
Option transport option
func WithErrorHandler ¶
func WithErrorHandler(value func(*bhraftpb.RaftMessage, error)) Option
WithErrorHandler set error handler
func WithMaxBodyBytes ¶
WithMaxBodyBytes set max body bytes for decode message
func WithSendBatch ¶
WithSendBatch set batch size for sending messages
func WithTimeout ¶
WithTimeout set read and write timeout for rpc
func WithWorkerCount ¶
WithWorkerCount set worker count for send raft messages
type Transport ¶
type Transport interface { // Start start the transport, receiving and sending messages Start() // Stop stop the transport Stop() // Send send the raft message to other node Send(*bhraftpb.RaftMessage) // SendingSnapshotCount returns the count of sending snapshots SendingSnapshotCount() uint64 }
Transport raft transport
func NewDefaultTransport ¶
func NewDefaultTransport( storeID uint64, addr string, snapMgr snapshot.SnapshotManager, handler MessageHandler, resolver ContainerResolver, opts ...Option) Transport
NewDefaultTransport create default transport
Click to show internal directories.
Click to hide internal directories.