Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Network ¶
type Network interface { network.PipeManager Start() error Stop() error // Send sends message waiting response Send(string, *pb.Message) (*pb.Message, error) // SendWithStream sends message using existed stream SendWithStream(network.Stream, *pb.Message) error PeerID() string // CountConnectedValidators counts connected validator numbers CountConnectedValidators() uint64 // RegisterMsgHandler registers one message type handler RegisterMsgHandler(messageType pb.Message_Type, handler func(network.Stream, *pb.Message)) error // RegisterMultiMsgHandler registers multi message type handler RegisterMultiMsgHandler(messageTypes []pb.Message_Type, handler func(network.Stream, *pb.Message)) error }
Directories ¶
Path | Synopsis |
---|---|
Package mock_network is a generated GoMock package.
|
Package mock_network is a generated GoMock package. |
Click to show internal directories.
Click to hide internal directories.