Documentation ¶
Overview ¶
Package mock_interfaces is a generated GoMock package.
Index ¶
- Variables
- func NewDiscoveryListener(logger *logrus.Logger, addr net.Addr) interfaces.RPCListener
- func NewListener(logger *logrus.Logger, addr net.Addr) interfaces.RPCListener
- type DiscoveryListener
- type GetBlockHeadersRequest
- type GetBlockHeadersResponse
- type GetMinedTxsRequest
- type GetMinedTxsResponse
- type GetPeersRequest
- type GetPeersResponse
- type GetPendingTxsRequest
- type GetPendingTxsResponse
- type GetSnapShotHdrNodeRequest
- type GetSnapShotHdrNodeResponse
- type GetSnapShotNodeRequest
- type GetSnapShotNodeResponse
- type GetSnapShotStateDataRequest
- type GetSnapShotStateDataResponse
- type GossipBlockHeaderAck
- type GossipBlockHeaderMessage
- type GossipNextHeightAck
- type GossipNextHeightMessage
- type GossipNextRoundAck
- type GossipNextRoundMessage
- type GossipPreCommitAck
- type GossipPreCommitMessage
- type GossipPreCommitNilAck
- type GossipPreCommitNilMessage
- type GossipPreVoteAck
- type GossipPreVoteMessage
- type GossipPreVoteNilAck
- type GossipPreVoteNilMessage
- type GossipProposalAck
- type GossipProposalMessage
- type GossipTransactionAck
- type GossipTransactionMessage
- type Listener
- type MockP2PClient
- func (m *MockP2PClient) Close() error
- func (m *MockP2PClient) CloseChan() <-chan struct{}
- func (m *MockP2PClient) EXPECT() *MockP2PClientMockRecorder
- func (m *MockP2PClient) GetBlockHeaders(arg0 context.Context, arg1 *proto.GetBlockHeadersRequest, ...) (*proto.GetBlockHeadersResponse, error)
- func (m *MockP2PClient) GetMinedTxs(arg0 context.Context, arg1 *proto.GetMinedTxsRequest, arg2 ...grpc.CallOption) (*proto.GetMinedTxsResponse, error)
- func (m *MockP2PClient) GetPeers(arg0 context.Context, arg1 *proto.GetPeersRequest, arg2 ...grpc.CallOption) (*proto.GetPeersResponse, error)
- func (m *MockP2PClient) GetPendingTxs(arg0 context.Context, arg1 *proto.GetPendingTxsRequest, ...) (*proto.GetPendingTxsResponse, error)
- func (m *MockP2PClient) GetSnapShotNode(arg0 context.Context, arg1 *proto.GetSnapShotNodeRequest, ...) (*proto.GetSnapShotNodeResponse, error)
- func (m *MockP2PClient) GetSnapShotStateData(arg0 context.Context, arg1 *proto.GetSnapShotStateDataRequest, ...) (*proto.GetSnapShotStateDataResponse, error)
- func (m *MockP2PClient) GossipBlockHeader(arg0 context.Context, arg1 *proto.GossipBlockHeaderMessage, ...) (*proto.GossipBlockHeaderAck, error)
- func (m *MockP2PClient) GossipNextHeight(arg0 context.Context, arg1 *proto.GossipNextHeightMessage, ...) (*proto.GossipNextHeightAck, error)
- func (m *MockP2PClient) GossipNextRound(arg0 context.Context, arg1 *proto.GossipNextRoundMessage, ...) (*proto.GossipNextRoundAck, error)
- func (m *MockP2PClient) GossipPreCommit(arg0 context.Context, arg1 *proto.GossipPreCommitMessage, ...) (*proto.GossipPreCommitAck, error)
- func (m *MockP2PClient) GossipPreCommitNil(arg0 context.Context, arg1 *proto.GossipPreCommitNilMessage, ...) (*proto.GossipPreCommitNilAck, error)
- func (m *MockP2PClient) GossipPreVote(arg0 context.Context, arg1 *proto.GossipPreVoteMessage, ...) (*proto.GossipPreVoteAck, error)
- func (m *MockP2PClient) GossipPreVoteNil(arg0 context.Context, arg1 *proto.GossipPreVoteNilMessage, ...) (*proto.GossipPreVoteNilAck, error)
- func (m *MockP2PClient) GossipProposal(arg0 context.Context, arg1 *proto.GossipProposalMessage, ...) (*proto.GossipProposalAck, error)
- func (m *MockP2PClient) GossipTransaction(arg0 context.Context, arg1 *proto.GossipTransactionMessage, ...) (*proto.GossipTransactionAck, error)
- func (m *MockP2PClient) NodeAddr() interfaces.NodeAddr
- func (m *MockP2PClient) Status(arg0 context.Context, arg1 *proto.StatusRequest, arg2 ...grpc.CallOption) (*proto.StatusResponse, error)
- type MockP2PClientMockRecorder
- func (mr *MockP2PClientMockRecorder) Close() *gomock.Call
- func (mr *MockP2PClientMockRecorder) CloseChan() *gomock.Call
- func (mr *MockP2PClientMockRecorder) GetBlockHeaders(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
- func (mr *MockP2PClientMockRecorder) GetMinedTxs(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
- func (mr *MockP2PClientMockRecorder) GetPeers(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
- func (mr *MockP2PClientMockRecorder) GetPendingTxs(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
- func (mr *MockP2PClientMockRecorder) GetSnapShotNodes(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
- func (mr *MockP2PClientMockRecorder) GetSnapShotStateData(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
- func (mr *MockP2PClientMockRecorder) GossipBlockHeader(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
- func (mr *MockP2PClientMockRecorder) GossipNextHeight(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
- func (mr *MockP2PClientMockRecorder) GossipNextRound(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
- func (mr *MockP2PClientMockRecorder) GossipPreCommit(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
- func (mr *MockP2PClientMockRecorder) GossipPreCommitNil(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
- func (mr *MockP2PClientMockRecorder) GossipPreVote(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
- func (mr *MockP2PClientMockRecorder) GossipPreVoteNil(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
- func (mr *MockP2PClientMockRecorder) GossipProposal(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
- func (mr *MockP2PClientMockRecorder) GossipTransaction(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
- func (mr *MockP2PClientMockRecorder) NodeAddr() *gomock.Call
- func (mr *MockP2PClientMockRecorder) Status(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
- type MuxHandler
- type P2PBus
- type P2PClient
- func (p2p *P2PClient) GetBlockHeaders(ctx context.Context, in *pb.GetBlockHeadersRequest, opts ...grpc.CallOption) (*pb.GetBlockHeadersResponse, error)
- func (p2p *P2PClient) GetMinedTxs(ctx context.Context, in *pb.GetMinedTxsRequest, opts ...grpc.CallOption) (*pb.GetMinedTxsResponse, error)
- func (p2p *P2PClient) GetPeers(ctx context.Context, in *pb.GetPeersRequest, opts ...grpc.CallOption) (*pb.GetPeersResponse, error)
- func (p2p *P2PClient) GetPendingTxs(ctx context.Context, in *pb.GetPendingTxsRequest, opts ...grpc.CallOption) (*pb.GetPendingTxsResponse, error)
- func (p2p *P2PClient) GetSnapShotHdrNode(ctx context.Context, in *pb.GetSnapShotHdrNodeRequest, opts ...grpc.CallOption) (*pb.GetSnapShotHdrNodeResponse, error)
- func (p2p *P2PClient) GetSnapShotNode(ctx context.Context, in *pb.GetSnapShotNodeRequest, opts ...grpc.CallOption) (*pb.GetSnapShotNodeResponse, error)
- func (p2p *P2PClient) GetSnapShotStateData(ctx context.Context, in *pb.GetSnapShotStateDataRequest, ...) (*pb.GetSnapShotStateDataResponse, error)
- func (p2p *P2PClient) GossipBlockHeader(ctx context.Context, in *pb.GossipBlockHeaderMessage, opts ...grpc.CallOption) (*pb.GossipBlockHeaderAck, error)
- func (p2p *P2PClient) GossipNextHeight(ctx context.Context, in *pb.GossipNextHeightMessage, opts ...grpc.CallOption) (*pb.GossipNextHeightAck, error)
- func (p2p *P2PClient) GossipNextRound(ctx context.Context, in *pb.GossipNextRoundMessage, opts ...grpc.CallOption) (*pb.GossipNextRoundAck, error)
- func (p2p *P2PClient) GossipPreCommit(ctx context.Context, in *pb.GossipPreCommitMessage, opts ...grpc.CallOption) (*pb.GossipPreCommitAck, error)
- func (p2p *P2PClient) GossipPreCommitNil(ctx context.Context, in *pb.GossipPreCommitNilMessage, opts ...grpc.CallOption) (*pb.GossipPreCommitNilAck, error)
- func (p2p *P2PClient) GossipPreVote(ctx context.Context, in *pb.GossipPreVoteMessage, opts ...grpc.CallOption) (*pb.GossipPreVoteAck, error)
- func (p2p *P2PClient) GossipPreVoteNil(ctx context.Context, in *pb.GossipPreVoteNilMessage, opts ...grpc.CallOption) (*pb.GossipPreVoteNilAck, error)
- func (p2p *P2PClient) GossipProposal(ctx context.Context, in *pb.GossipProposalMessage, opts ...grpc.CallOption) (*pb.GossipProposalAck, error)
- func (p2p *P2PClient) GossipTransaction(ctx context.Context, in *pb.GossipTransactionMessage, opts ...grpc.CallOption) (*pb.GossipTransactionAck, error)
- func (p2p *P2PClient) Status(ctx context.Context, in *pb.StatusRequest, opts ...grpc.CallOption) (*pb.StatusResponse, error)
- type PeerManager
- func (ps *PeerManager) Close() error
- func (ps *PeerManager) CloseChan() <-chan struct{}
- func (ps *PeerManager) Counts() (int, int)
- func (ps *PeerManager) GetPeers(ctx context.Context, req *pb.GetPeersRequest) (*pb.GetPeersResponse, error)
- func (ps *PeerManager) HandleP2PGetPeers(ctx context.Context, req *pb.GetPeersRequest) (*pb.GetPeersResponse, error)
- func (ps *PeerManager) P2PClient() pb.P2PClient
- func (ps *PeerManager) PeeringComplete() bool
- func (ps *PeerManager) Start()
- func (ps *PeerManager) Status(smap map[string]interface{}) (map[string]interface{}, error)
- type ServerHandler
- type StatusRequest
- type StatusResponse
Constants ¶
This section is empty.
Variables ¶
var ErrWouldBlock = errors.New("unable to broadcast due to blocking")
Functions ¶
func NewDiscoveryListener ¶
func NewDiscoveryListener(logger *logrus.Logger, addr net.Addr) interfaces.RPCListener
NewDiscoveryListener returns a new Listener that conforms to the RPCListener interface.
func NewListener ¶
func NewListener(logger *logrus.Logger, addr net.Addr) interfaces.RPCListener
NewListener returns a new Listener that conforms to the RPCListener interface.
Types ¶
type DiscoveryListener ¶
type DiscoveryListener struct {
// contains filtered or unexported fields
}
DiscoveryListener allows a P2PConn to be converted into a net.Conn through the Accept method. This allows the injection of P2PConn objects into the grpc server through registering the Listener as the listener used by a grpc server.
func (*DiscoveryListener) Accept ¶
func (rpcl *DiscoveryListener) Accept() (net.Conn, error)
Accept allows Listener to implement net.Listener interface When called, Accept returns a net.Conn connection to the caller as new connections arrive.
func (*DiscoveryListener) Addr ¶
func (rpcl *DiscoveryListener) Addr() net.Addr
Addr allows Listener to implement net.Listener interface.
func (*DiscoveryListener) Close ¶
func (rpcl *DiscoveryListener) Close() error
Close allows Listener to implement net.Listener interface Close also closes the Listener Accept method and raises an error to the caller of Accept.
func (*DiscoveryListener) NewConnection ¶
func (rpcl *DiscoveryListener) NewConnection(conn interfaces.P2PConn) error
NewConnection allows a P2PConn to be injected into the Listener such that the goroutine calling Accept will recv the P2PConn as a net.Conn.
type GetBlockHeadersRequest ¶
type GetBlockHeadersRequest struct {
// contains filtered or unexported fields
}
type GetBlockHeadersResponse ¶
type GetBlockHeadersResponse struct {
// contains filtered or unexported fields
}
type GetMinedTxsRequest ¶
type GetMinedTxsRequest struct {
// contains filtered or unexported fields
}
type GetMinedTxsResponse ¶
type GetMinedTxsResponse struct {
// contains filtered or unexported fields
}
type GetPeersRequest ¶
type GetPeersRequest struct {
// contains filtered or unexported fields
}
type GetPeersResponse ¶
type GetPeersResponse struct {
// contains filtered or unexported fields
}
type GetPendingTxsRequest ¶
type GetPendingTxsRequest struct {
// contains filtered or unexported fields
}
type GetPendingTxsResponse ¶
type GetPendingTxsResponse struct {
// contains filtered or unexported fields
}
type GetSnapShotHdrNodeRequest ¶
type GetSnapShotHdrNodeRequest struct {
// contains filtered or unexported fields
}
type GetSnapShotHdrNodeResponse ¶
type GetSnapShotHdrNodeResponse struct {
// contains filtered or unexported fields
}
type GetSnapShotNodeRequest ¶
type GetSnapShotNodeRequest struct {
// contains filtered or unexported fields
}
type GetSnapShotNodeResponse ¶
type GetSnapShotNodeResponse struct {
// contains filtered or unexported fields
}
type GetSnapShotStateDataRequest ¶
type GetSnapShotStateDataRequest struct {
// contains filtered or unexported fields
}
type GetSnapShotStateDataResponse ¶
type GetSnapShotStateDataResponse struct {
// contains filtered or unexported fields
}
type GossipBlockHeaderAck ¶
type GossipBlockHeaderAck struct {
// contains filtered or unexported fields
}
type GossipBlockHeaderMessage ¶
type GossipBlockHeaderMessage struct {
// contains filtered or unexported fields
}
type GossipNextHeightAck ¶
type GossipNextHeightAck struct {
// contains filtered or unexported fields
}
type GossipNextHeightMessage ¶
type GossipNextHeightMessage struct {
// contains filtered or unexported fields
}
type GossipNextRoundAck ¶
type GossipNextRoundAck struct {
// contains filtered or unexported fields
}
type GossipNextRoundMessage ¶
type GossipNextRoundMessage struct {
// contains filtered or unexported fields
}
type GossipPreCommitAck ¶
type GossipPreCommitAck struct {
// contains filtered or unexported fields
}
type GossipPreCommitMessage ¶
type GossipPreCommitMessage struct {
// contains filtered or unexported fields
}
type GossipPreCommitNilAck ¶
type GossipPreCommitNilAck struct {
// contains filtered or unexported fields
}
type GossipPreCommitNilMessage ¶
type GossipPreCommitNilMessage struct {
// contains filtered or unexported fields
}
type GossipPreVoteAck ¶
type GossipPreVoteAck struct {
// contains filtered or unexported fields
}
type GossipPreVoteMessage ¶
type GossipPreVoteMessage struct {
// contains filtered or unexported fields
}
type GossipPreVoteNilAck ¶
type GossipPreVoteNilAck struct {
// contains filtered or unexported fields
}
type GossipPreVoteNilMessage ¶
type GossipPreVoteNilMessage struct {
// contains filtered or unexported fields
}
type GossipProposalAck ¶
type GossipProposalAck struct {
// contains filtered or unexported fields
}
type GossipProposalMessage ¶
type GossipProposalMessage struct {
// contains filtered or unexported fields
}
type GossipTransactionAck ¶
type GossipTransactionAck struct {
// contains filtered or unexported fields
}
type GossipTransactionMessage ¶
type GossipTransactionMessage struct {
// contains filtered or unexported fields
}
type Listener ¶
type Listener struct {
// contains filtered or unexported fields
}
Listener allows a P2PConn to be converted into a net.Conn through the Accept method. This allows the injection of P2PConn objects into the grpc server through registering the Listener as the listener used by a grpc server.
func (*Listener) Accept ¶
Accept allows Listener to implement net.Listener interface When called, Accept returns a net.Conn connection to the caller as new connections arrive.
func (*Listener) Close ¶
Close allows Listener to implement net.Listener interface Close also closes the Listener Accept method and raises an error to the caller of Accept.
func (*Listener) NewConnection ¶
func (rpcl *Listener) NewConnection(conn interfaces.P2PConn) error
NewConnection allows a P2PConn to be injected into the Listener such that the goroutine calling Accept will recv the P2PConn as a net.Conn.
type MockP2PClient ¶
type MockP2PClient struct {
// contains filtered or unexported fields
}
MockP2PClient is a mock of P2PClient interface
func NewMockP2PClient ¶
func NewMockP2PClient(ctrl *gomock.Controller) *MockP2PClient
NewMockP2PClient creates a new mock instance
func (*MockP2PClient) CloseChan ¶
func (m *MockP2PClient) CloseChan() <-chan struct{}
CloseChan mocks base method
func (*MockP2PClient) EXPECT ¶
func (m *MockP2PClient) EXPECT() *MockP2PClientMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockP2PClient) GetBlockHeaders ¶
func (m *MockP2PClient) GetBlockHeaders(arg0 context.Context, arg1 *proto.GetBlockHeadersRequest, arg2 ...grpc.CallOption) (*proto.GetBlockHeadersResponse, error)
GetBlockHeaders mocks base method
func (*MockP2PClient) GetMinedTxs ¶
func (m *MockP2PClient) GetMinedTxs(arg0 context.Context, arg1 *proto.GetMinedTxsRequest, arg2 ...grpc.CallOption) (*proto.GetMinedTxsResponse, error)
GetMinedTxs mocks base method
func (*MockP2PClient) GetPeers ¶
func (m *MockP2PClient) GetPeers(arg0 context.Context, arg1 *proto.GetPeersRequest, arg2 ...grpc.CallOption) (*proto.GetPeersResponse, error)
GetPeers mocks base method
func (*MockP2PClient) GetPendingTxs ¶
func (m *MockP2PClient) GetPendingTxs(arg0 context.Context, arg1 *proto.GetPendingTxsRequest, arg2 ...grpc.CallOption) (*proto.GetPendingTxsResponse, error)
GetPendingTxs mocks base method
func (*MockP2PClient) GetSnapShotNode ¶
func (m *MockP2PClient) GetSnapShotNode(arg0 context.Context, arg1 *proto.GetSnapShotNodeRequest, arg2 ...grpc.CallOption) (*proto.GetSnapShotNodeResponse, error)
GetSnapShotNodes mocks base method
func (*MockP2PClient) GetSnapShotStateData ¶
func (m *MockP2PClient) GetSnapShotStateData(arg0 context.Context, arg1 *proto.GetSnapShotStateDataRequest, arg2 ...grpc.CallOption) (*proto.GetSnapShotStateDataResponse, error)
GetSnapShotLeaves mocks base method
func (*MockP2PClient) GossipBlockHeader ¶
func (m *MockP2PClient) GossipBlockHeader(arg0 context.Context, arg1 *proto.GossipBlockHeaderMessage, arg2 ...grpc.CallOption) (*proto.GossipBlockHeaderAck, error)
GossipBlockHeader mocks base method
func (*MockP2PClient) GossipNextHeight ¶
func (m *MockP2PClient) GossipNextHeight(arg0 context.Context, arg1 *proto.GossipNextHeightMessage, arg2 ...grpc.CallOption) (*proto.GossipNextHeightAck, error)
GossipNextHeight mocks base method
func (*MockP2PClient) GossipNextRound ¶
func (m *MockP2PClient) GossipNextRound(arg0 context.Context, arg1 *proto.GossipNextRoundMessage, arg2 ...grpc.CallOption) (*proto.GossipNextRoundAck, error)
GossipNextRound mocks base method
func (*MockP2PClient) GossipPreCommit ¶
func (m *MockP2PClient) GossipPreCommit(arg0 context.Context, arg1 *proto.GossipPreCommitMessage, arg2 ...grpc.CallOption) (*proto.GossipPreCommitAck, error)
GossipPreCommit mocks base method
func (*MockP2PClient) GossipPreCommitNil ¶
func (m *MockP2PClient) GossipPreCommitNil(arg0 context.Context, arg1 *proto.GossipPreCommitNilMessage, arg2 ...grpc.CallOption) (*proto.GossipPreCommitNilAck, error)
GossipPreCommitNil mocks base method
func (*MockP2PClient) GossipPreVote ¶
func (m *MockP2PClient) GossipPreVote(arg0 context.Context, arg1 *proto.GossipPreVoteMessage, arg2 ...grpc.CallOption) (*proto.GossipPreVoteAck, error)
GossipPreVote mocks base method
func (*MockP2PClient) GossipPreVoteNil ¶
func (m *MockP2PClient) GossipPreVoteNil(arg0 context.Context, arg1 *proto.GossipPreVoteNilMessage, arg2 ...grpc.CallOption) (*proto.GossipPreVoteNilAck, error)
GossipPreVoteNil mocks base method
func (*MockP2PClient) GossipProposal ¶
func (m *MockP2PClient) GossipProposal(arg0 context.Context, arg1 *proto.GossipProposalMessage, arg2 ...grpc.CallOption) (*proto.GossipProposalAck, error)
GossipProposal mocks base method
func (*MockP2PClient) GossipTransaction ¶
func (m *MockP2PClient) GossipTransaction(arg0 context.Context, arg1 *proto.GossipTransactionMessage, arg2 ...grpc.CallOption) (*proto.GossipTransactionAck, error)
GossipTransaction mocks base method
func (*MockP2PClient) NodeAddr ¶
func (m *MockP2PClient) NodeAddr() interfaces.NodeAddr
NodeAddr mocks base method
func (*MockP2PClient) Status ¶
func (m *MockP2PClient) Status(arg0 context.Context, arg1 *proto.StatusRequest, arg2 ...grpc.CallOption) (*proto.StatusResponse, error)
Status mocks base method
type MockP2PClientMockRecorder ¶
type MockP2PClientMockRecorder struct {
// contains filtered or unexported fields
}
MockP2PClientMockRecorder is the mock recorder for MockP2PClient
func (*MockP2PClientMockRecorder) Close ¶
func (mr *MockP2PClientMockRecorder) Close() *gomock.Call
Close indicates an expected call of Close
func (*MockP2PClientMockRecorder) CloseChan ¶
func (mr *MockP2PClientMockRecorder) CloseChan() *gomock.Call
CloseChan indicates an expected call of CloseChan
func (*MockP2PClientMockRecorder) GetBlockHeaders ¶
func (mr *MockP2PClientMockRecorder) GetBlockHeaders(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
GetBlockHeaders indicates an expected call of GetBlockHeaders
func (*MockP2PClientMockRecorder) GetMinedTxs ¶
func (mr *MockP2PClientMockRecorder) GetMinedTxs(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
GetMinedTxs indicates an expected call of GetMinedTxs
func (*MockP2PClientMockRecorder) GetPeers ¶
func (mr *MockP2PClientMockRecorder) GetPeers(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
GetPeers indicates an expected call of GetPeers
func (*MockP2PClientMockRecorder) GetPendingTxs ¶
func (mr *MockP2PClientMockRecorder) GetPendingTxs(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
GetPendingTxs indicates an expected call of GetPendingTxs
func (*MockP2PClientMockRecorder) GetSnapShotNodes ¶
func (mr *MockP2PClientMockRecorder) GetSnapShotNodes(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
GetSnapShotNodes indicates an expected call of GetSnapShotNodes
func (*MockP2PClientMockRecorder) GetSnapShotStateData ¶
func (mr *MockP2PClientMockRecorder) GetSnapShotStateData(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
GetSnapShotLeaves indicates an expected call of GetSnapShotLeaves
func (*MockP2PClientMockRecorder) GossipBlockHeader ¶
func (mr *MockP2PClientMockRecorder) GossipBlockHeader(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
GossipBlockHeader indicates an expected call of GossipBlockHeader
func (*MockP2PClientMockRecorder) GossipNextHeight ¶
func (mr *MockP2PClientMockRecorder) GossipNextHeight(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
GossipNextHeight indicates an expected call of GossipNextHeight
func (*MockP2PClientMockRecorder) GossipNextRound ¶
func (mr *MockP2PClientMockRecorder) GossipNextRound(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
GossipNextRound indicates an expected call of GossipNextRound
func (*MockP2PClientMockRecorder) GossipPreCommit ¶
func (mr *MockP2PClientMockRecorder) GossipPreCommit(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
GossipPreCommit indicates an expected call of GossipPreCommit
func (*MockP2PClientMockRecorder) GossipPreCommitNil ¶
func (mr *MockP2PClientMockRecorder) GossipPreCommitNil(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
GossipPreCommitNil indicates an expected call of GossipPreCommitNil
func (*MockP2PClientMockRecorder) GossipPreVote ¶
func (mr *MockP2PClientMockRecorder) GossipPreVote(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
GossipPreVote indicates an expected call of GossipPreVote
func (*MockP2PClientMockRecorder) GossipPreVoteNil ¶
func (mr *MockP2PClientMockRecorder) GossipPreVoteNil(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
GossipPreVoteNil indicates an expected call of GossipPreVoteNil
func (*MockP2PClientMockRecorder) GossipProposal ¶
func (mr *MockP2PClientMockRecorder) GossipProposal(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
GossipProposal indicates an expected call of GossipProposal
func (*MockP2PClientMockRecorder) GossipTransaction ¶
func (mr *MockP2PClientMockRecorder) GossipTransaction(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
GossipTransaction indicates an expected call of GossipTransaction
func (*MockP2PClientMockRecorder) NodeAddr ¶
func (mr *MockP2PClientMockRecorder) NodeAddr() *gomock.Call
NodeAddr indicates an expected call of NodeAddr
func (*MockP2PClientMockRecorder) Status ¶
func (mr *MockP2PClientMockRecorder) Status(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
Status indicates an expected call of Status
type MuxHandler ¶
type MuxHandler struct {
// contains filtered or unexported fields
}
MuxHandler allows a P2PMuxConn to be converted into a bidirectional grpc client and server connection. The server side connection is injected into an exiting grpc server running the P2P service and the client is bound against a the P2P service.
func NewMuxServerHandler ¶
func NewMuxServerHandler(logger *logrus.Logger, addr net.Addr, service interfaces.P2PServer) *MuxHandler
NewMuxServerHandler creates a new multiplexed grpc tunneling system for P2PMuxConn objects.
func (*MuxHandler) Close ¶
func (rpcm *MuxHandler) Close() error
Close will shutdown the server handler.
func (*MuxHandler) HandleConnection ¶
func (rpcm *MuxHandler) HandleConnection(conn interfaces.P2PMuxConn) (interfaces.P2PClient, error)
HandleConnection binds the P2PMuxConn to a grpc client and server. Internally this method uses the Initiator() method to determine if it should run the client or server side handshake. The only object returned is the P2PClient. The server side connection is handed off to the grpc server. Both the client and the server side connections may be shut down using the original P2PMuxConn Close method.
type P2PClient ¶
type P2PClient struct {
// contains filtered or unexported fields
}
func (*P2PClient) GetBlockHeaders ¶
func (p2p *P2PClient) GetBlockHeaders(ctx context.Context, in *pb.GetBlockHeadersRequest, opts ...grpc.CallOption) (*pb.GetBlockHeadersResponse, error)
func (*P2PClient) GetMinedTxs ¶
func (p2p *P2PClient) GetMinedTxs(ctx context.Context, in *pb.GetMinedTxsRequest, opts ...grpc.CallOption) (*pb.GetMinedTxsResponse, error)
func (*P2PClient) GetPeers ¶
func (p2p *P2PClient) GetPeers(ctx context.Context, in *pb.GetPeersRequest, opts ...grpc.CallOption) (*pb.GetPeersResponse, error)
func (*P2PClient) GetPendingTxs ¶
func (p2p *P2PClient) GetPendingTxs(ctx context.Context, in *pb.GetPendingTxsRequest, opts ...grpc.CallOption) (*pb.GetPendingTxsResponse, error)
func (*P2PClient) GetSnapShotHdrNode ¶
func (p2p *P2PClient) GetSnapShotHdrNode(ctx context.Context, in *pb.GetSnapShotHdrNodeRequest, opts ...grpc.CallOption) (*pb.GetSnapShotHdrNodeResponse, error)
func (*P2PClient) GetSnapShotNode ¶
func (p2p *P2PClient) GetSnapShotNode(ctx context.Context, in *pb.GetSnapShotNodeRequest, opts ...grpc.CallOption) (*pb.GetSnapShotNodeResponse, error)
func (*P2PClient) GetSnapShotStateData ¶
func (p2p *P2PClient) GetSnapShotStateData(ctx context.Context, in *pb.GetSnapShotStateDataRequest, opts ...grpc.CallOption) (*pb.GetSnapShotStateDataResponse, error)
func (*P2PClient) GossipBlockHeader ¶
func (p2p *P2PClient) GossipBlockHeader(ctx context.Context, in *pb.GossipBlockHeaderMessage, opts ...grpc.CallOption) (*pb.GossipBlockHeaderAck, error)
func (*P2PClient) GossipNextHeight ¶
func (p2p *P2PClient) GossipNextHeight(ctx context.Context, in *pb.GossipNextHeightMessage, opts ...grpc.CallOption) (*pb.GossipNextHeightAck, error)
func (*P2PClient) GossipNextRound ¶
func (p2p *P2PClient) GossipNextRound(ctx context.Context, in *pb.GossipNextRoundMessage, opts ...grpc.CallOption) (*pb.GossipNextRoundAck, error)
func (*P2PClient) GossipPreCommit ¶
func (p2p *P2PClient) GossipPreCommit(ctx context.Context, in *pb.GossipPreCommitMessage, opts ...grpc.CallOption) (*pb.GossipPreCommitAck, error)
func (*P2PClient) GossipPreCommitNil ¶
func (p2p *P2PClient) GossipPreCommitNil(ctx context.Context, in *pb.GossipPreCommitNilMessage, opts ...grpc.CallOption) (*pb.GossipPreCommitNilAck, error)
func (*P2PClient) GossipPreVote ¶
func (p2p *P2PClient) GossipPreVote(ctx context.Context, in *pb.GossipPreVoteMessage, opts ...grpc.CallOption) (*pb.GossipPreVoteAck, error)
func (*P2PClient) GossipPreVoteNil ¶
func (p2p *P2PClient) GossipPreVoteNil(ctx context.Context, in *pb.GossipPreVoteNilMessage, opts ...grpc.CallOption) (*pb.GossipPreVoteNilAck, error)
func (*P2PClient) GossipProposal ¶
func (p2p *P2PClient) GossipProposal(ctx context.Context, in *pb.GossipProposalMessage, opts ...grpc.CallOption) (*pb.GossipProposalAck, error)
func (*P2PClient) GossipTransaction ¶
func (p2p *P2PClient) GossipTransaction(ctx context.Context, in *pb.GossipTransactionMessage, opts ...grpc.CallOption) (*pb.GossipTransactionAck, error)
func (*P2PClient) Status ¶
func (p2p *P2PClient) Status(ctx context.Context, in *pb.StatusRequest, opts ...grpc.CallOption) (*pb.StatusResponse, error)
type PeerManager ¶
PeerManager is a self contained system for management of peering. Other packages that need to send state to peers may subscribe to the peer manager and be notified of active peers. This notification occurs through the peer subscription system.
func NewPeerManager ¶
func NewPeerManager(p2pServer interfaces.P2PServer, chainID uint32, pLimMin, pLimMax int, fwMode bool, fwHost, listenAddr, tprivk string, upnp bool) (*PeerManager, error)
NewPeerManager creates a new peer manager based on the Configuration values passed to the process.
func (*PeerManager) Close ¶
func (ps *PeerManager) Close() error
Close will shutdown the peer manager causing all transports and connections to be closed as well.
func (*PeerManager) CloseChan ¶
func (ps *PeerManager) CloseChan() <-chan struct{}
CloseChan returns a channel that is closed when the peerManager is shutting down.
func (*PeerManager) Counts ¶
func (ps *PeerManager) Counts() (int, int)
Counts returns the active and inactive peer counts.
func (*PeerManager) GetPeers ¶
func (ps *PeerManager) GetPeers(ctx context.Context, req *pb.GetPeersRequest) (*pb.GetPeersResponse, error)
GetPeers is the handler for the get peers request.
func (*PeerManager) HandleP2PGetPeers ¶
func (ps *PeerManager) HandleP2PGetPeers(ctx context.Context, req *pb.GetPeersRequest) (*pb.GetPeersResponse, error)
HandleP2PGetPeers is the handler for the P2P method GetPeers.
func (*PeerManager) P2PClient ¶
func (ps *PeerManager) P2PClient() pb.P2PClient
P2PClient returns a wrapper around the gossip and request bus channels for use by remote systems to make requests through the load balanced work sharing system.
func (*PeerManager) PeeringComplete ¶
func (ps *PeerManager) PeeringComplete() bool
PeeringComplete returns true if the peering is complete for the node.
func (*PeerManager) Start ¶
func (ps *PeerManager) Start()
Start launches the background loops of the peer manager.
type ServerHandler ¶
type ServerHandler struct {
// contains filtered or unexported fields
}
ServerHandler binds a RPCListener to a grpc server such that the connections injected into the listener will be bound against the grpc server.
func NewBootNodeServerHandler ¶
func NewBootNodeServerHandler(logger *logrus.Logger, addr net.Addr, service interfaces.BootNodeServer) *ServerHandler
NewBootNodeServerHandler returns a RPC ServerHandler for the BootNode Service.
func NewP2PDiscoveryServerHandler ¶
func NewP2PDiscoveryServerHandler(logger *logrus.Logger, addr net.Addr, service interfaces.P2PDiscoveryServer) *ServerHandler
NewP2PDiscoveryServerHandler returns a RPC ServerHandler for the Discovery Service.
func (*ServerHandler) Close ¶
func (rpch *ServerHandler) Close() error
Close will shutdown the server handler.
func (*ServerHandler) HandleConnection ¶
func (rpch *ServerHandler) HandleConnection(conn interfaces.P2PConn) error
HandleConnection will inject the provided P2PConn into the NewConnection method of the bound RPCListener for consumption by the grpc server.
type StatusRequest ¶
type StatusRequest struct {
// contains filtered or unexported fields
}
type StatusResponse ¶
type StatusResponse struct {
// contains filtered or unexported fields
}