Documentation
¶
Index ¶
- func Combined(natSetting string, port int, staticPeers []string, discovery bool, ...) error
- func Download(filesDir string, bufferSizeStr string, sentryAddr string, coreAddr string, ...) error
- func Sentry(natSetting string, port int, sentryAddr string, coreAddr string, ...) error
- type BlockHeadersFromSentry
- type ControlServerImpl
- type PenaltyMsg
- type SentryClientDirect
- func (scd *SentryClientDirect) PeerMinBlock(ctx context.Context, in *proto_sentry.PeerMinBlockRequest, ...) (*empty.Empty, error)
- func (scd *SentryClientDirect) PenalizePeer(ctx context.Context, in *proto_sentry.PenalizePeerRequest, ...) (*empty.Empty, error)
- func (scd *SentryClientDirect) ReceiveMessages(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (proto_sentry.Sentry_ReceiveMessagesClient, error)
- func (scd *SentryClientDirect) ReceiveTxMessages(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (proto_sentry.Sentry_ReceiveTxMessagesClient, error)
- func (scd *SentryClientDirect) ReceiveUploadMessages(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (proto_sentry.Sentry_ReceiveUploadMessagesClient, error)
- func (scd *SentryClientDirect) SendMessageById(ctx context.Context, in *proto_sentry.SendMessageByIdRequest, ...) (*proto_sentry.SentPeers, error)
- func (scd *SentryClientDirect) SendMessageByMinBlock(ctx context.Context, in *proto_sentry.SendMessageByMinBlockRequest, ...) (*proto_sentry.SentPeers, error)
- func (scd *SentryClientDirect) SendMessageToAll(ctx context.Context, in *proto_sentry.OutboundMessageData, ...) (*proto_sentry.SentPeers, error)
- func (scd *SentryClientDirect) SendMessageToRandomPeers(ctx context.Context, in *proto_sentry.SendMessageToRandomPeersRequest, ...) (*proto_sentry.SentPeers, error)
- func (scd *SentryClientDirect) SetServer(sentryServer proto_sentry.SentryServer)
- func (scd *SentryClientDirect) SetStatus(ctx context.Context, in *proto_sentry.StatusData, opts ...grpc.CallOption) (*emptypb.Empty, error)
- type SentryMsg
- type SentryReceiveClientDirect
- type SentryReceiveServerDirect
- type SentryServerImpl
- func (ss *SentryServerImpl) PeerMinBlock(_ context.Context, req *proto_sentry.PeerMinBlockRequest) (*empty.Empty, error)
- func (ss *SentryServerImpl) PenalizePeer(_ context.Context, req *proto_sentry.PenalizePeerRequest) (*empty.Empty, error)
- func (ss *SentryServerImpl) ReceiveMessages(_ *emptypb.Empty, server proto_sentry.Sentry_ReceiveMessagesServer) error
- func (ss *SentryServerImpl) ReceiveUploadMessages(_ *emptypb.Empty, server proto_sentry.Sentry_ReceiveUploadMessagesServer) error
- func (ss *SentryServerImpl) SendMessageById(_ context.Context, inreq *proto_sentry.SendMessageByIdRequest) (*proto_sentry.SentPeers, error)
- func (ss *SentryServerImpl) SendMessageByMinBlock(_ context.Context, inreq *proto_sentry.SendMessageByMinBlockRequest) (*proto_sentry.SentPeers, error)
- func (ss *SentryServerImpl) SendMessageToAll(context.Context, *proto_sentry.OutboundMessageData) (*proto_sentry.SentPeers, error)
- func (ss *SentryServerImpl) SendMessageToRandomPeers(context.Context, *proto_sentry.SendMessageToRandomPeersRequest) (*proto_sentry.SentPeers, error)
- func (ss *SentryServerImpl) SetStatus(_ context.Context, statusData *proto_sentry.StatusData) (*emptypb.Empty, error)
- type StreamMsg
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Combined ¶
func Combined(natSetting string, port int, staticPeers []string, discovery bool, netRestrict string, filesDir string, bufferSizeStr string, db ethdb.Database, timeout, window int) error
Combined creates and starts sentry and downloader in the same process
Types ¶
type BlockHeadersFromSentry ¶
type BlockHeadersFromSentry struct {
SentryMsg
// contains filtered or unexported fields
}
type ControlServerImpl ¶
type ControlServerImpl struct {
// contains filtered or unexported fields
}
func NewControlServer ¶
func NewControlServer(db ethdb.Database, filesDir string, bufferSize int, sentryClient proto_sentry.SentryClient, window int) (*ControlServerImpl, error)
type PenaltyMsg ¶
type PenaltyMsg struct {
SentryMsg
// contains filtered or unexported fields
}
type SentryClientDirect ¶
type SentryClientDirect struct {
// contains filtered or unexported fields
}
SentryClientDirect implements SentryClient interface by connecting the instance of the client directly with the corresponding instance of SentryServer
func (*SentryClientDirect) PeerMinBlock ¶
func (scd *SentryClientDirect) PeerMinBlock(ctx context.Context, in *proto_sentry.PeerMinBlockRequest, opts ...grpc.CallOption) (*empty.Empty, error)
func (*SentryClientDirect) PenalizePeer ¶
func (scd *SentryClientDirect) PenalizePeer(ctx context.Context, in *proto_sentry.PenalizePeerRequest, opts ...grpc.CallOption) (*empty.Empty, error)
func (*SentryClientDirect) ReceiveMessages ¶
func (scd *SentryClientDirect) ReceiveMessages(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (proto_sentry.Sentry_ReceiveMessagesClient, error)
func (*SentryClientDirect) ReceiveTxMessages ¶
func (scd *SentryClientDirect) ReceiveTxMessages(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (proto_sentry.Sentry_ReceiveTxMessagesClient, error)
func (*SentryClientDirect) ReceiveUploadMessages ¶
func (scd *SentryClientDirect) ReceiveUploadMessages(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (proto_sentry.Sentry_ReceiveUploadMessagesClient, error)
func (*SentryClientDirect) SendMessageById ¶
func (scd *SentryClientDirect) SendMessageById(ctx context.Context, in *proto_sentry.SendMessageByIdRequest, opts ...grpc.CallOption) (*proto_sentry.SentPeers, error)
func (*SentryClientDirect) SendMessageByMinBlock ¶
func (scd *SentryClientDirect) SendMessageByMinBlock(ctx context.Context, in *proto_sentry.SendMessageByMinBlockRequest, opts ...grpc.CallOption) (*proto_sentry.SentPeers, error)
func (*SentryClientDirect) SendMessageToAll ¶
func (scd *SentryClientDirect) SendMessageToAll(ctx context.Context, in *proto_sentry.OutboundMessageData, opts ...grpc.CallOption) (*proto_sentry.SentPeers, error)
func (*SentryClientDirect) SendMessageToRandomPeers ¶
func (scd *SentryClientDirect) SendMessageToRandomPeers(ctx context.Context, in *proto_sentry.SendMessageToRandomPeersRequest, opts ...grpc.CallOption) (*proto_sentry.SentPeers, error)
func (*SentryClientDirect) SetServer ¶
func (scd *SentryClientDirect) SetServer(sentryServer proto_sentry.SentryServer)
SetServer injects a reference to the SentryServer into the client
func (*SentryClientDirect) SetStatus ¶
func (scd *SentryClientDirect) SetStatus(ctx context.Context, in *proto_sentry.StatusData, opts ...grpc.CallOption) (*emptypb.Empty, error)
type SentryMsg ¶
type SentryMsg struct {
// contains filtered or unexported fields
}
SentryMsg declares ID fields necessary for communicating with the sentry
type SentryReceiveClientDirect ¶
type SentryReceiveClientDirect struct {
grpc.ClientStream
// contains filtered or unexported fields
}
func (*SentryReceiveClientDirect) Recv ¶
func (c *SentryReceiveClientDirect) Recv() (*proto_sentry.InboundMessage, error)
type SentryReceiveServerDirect ¶
type SentryReceiveServerDirect struct {
grpc.ServerStream
// contains filtered or unexported fields
}
implements proto_sentry.Sentry_ReceiveMessagesServer
func (*SentryReceiveServerDirect) Send ¶
func (s *SentryReceiveServerDirect) Send(m *proto_sentry.InboundMessage) error
type SentryServerImpl ¶
type SentryServerImpl struct {
proto_sentry.UnimplementedSentryServer
// contains filtered or unexported fields
}
func (*SentryServerImpl) PeerMinBlock ¶
func (ss *SentryServerImpl) PeerMinBlock(_ context.Context, req *proto_sentry.PeerMinBlockRequest) (*empty.Empty, error)
func (*SentryServerImpl) PenalizePeer ¶
func (ss *SentryServerImpl) PenalizePeer(_ context.Context, req *proto_sentry.PenalizePeerRequest) (*empty.Empty, error)
func (*SentryServerImpl) ReceiveMessages ¶
func (ss *SentryServerImpl) ReceiveMessages(_ *emptypb.Empty, server proto_sentry.Sentry_ReceiveMessagesServer) error
func (*SentryServerImpl) ReceiveUploadMessages ¶
func (ss *SentryServerImpl) ReceiveUploadMessages(_ *emptypb.Empty, server proto_sentry.Sentry_ReceiveUploadMessagesServer) error
func (*SentryServerImpl) SendMessageById ¶
func (ss *SentryServerImpl) SendMessageById(_ context.Context, inreq *proto_sentry.SendMessageByIdRequest) (*proto_sentry.SentPeers, error)
func (*SentryServerImpl) SendMessageByMinBlock ¶
func (ss *SentryServerImpl) SendMessageByMinBlock(_ context.Context, inreq *proto_sentry.SendMessageByMinBlockRequest) (*proto_sentry.SentPeers, error)
func (*SentryServerImpl) SendMessageToAll ¶
func (ss *SentryServerImpl) SendMessageToAll(context.Context, *proto_sentry.OutboundMessageData) (*proto_sentry.SentPeers, error)
func (*SentryServerImpl) SendMessageToRandomPeers ¶
func (ss *SentryServerImpl) SendMessageToRandomPeers(context.Context, *proto_sentry.SendMessageToRandomPeersRequest) (*proto_sentry.SentPeers, error)
func (*SentryServerImpl) SetStatus ¶
func (ss *SentryServerImpl) SetStatus(_ context.Context, statusData *proto_sentry.StatusData) (*emptypb.Empty, error)
Click to show internal directories.
Click to hide internal directories.