download

package
v0.0.0-...-140c642 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 24, 2021 License: GPL-3.0 Imports: 47 Imported by: 0

Documentation

Index

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

func Download

func Download(filesDir string, bufferSizeStr string, sentryAddr string, coreAddr string, db ethdb.Database, timeout, window int) error

Download creates and starts standalone downloader

func Sentry

func Sentry(natSetting string, port int, sentryAddr string, coreAddr string, staticPeers []string, discovery bool, netRestrict string) error

Sentry creates and runs standalone sentry

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 (*SentryClientDirect) PenalizePeer

func (*SentryClientDirect) ReceiveMessages

func (*SentryClientDirect) ReceiveTxMessages

func (*SentryClientDirect) ReceiveUploadMessages

func (*SentryClientDirect) SendMessageById

func (*SentryClientDirect) SendMessageByMinBlock

func (*SentryClientDirect) SendMessageToAll

func (*SentryClientDirect) SendMessageToRandomPeers

func (*SentryClientDirect) SetServer

func (scd *SentryClientDirect) SetServer(sentryServer proto_sentry.SentryServer)

SetServer injects a reference to the SentryServer into the client

func (*SentryClientDirect) SetStatus

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

type SentryReceiveServerDirect

type SentryReceiveServerDirect struct {
	grpc.ServerStream
	// contains filtered or unexported fields
}

implements proto_sentry.Sentry_ReceiveMessagesServer

func (*SentryReceiveServerDirect) Send

type SentryServerImpl

type SentryServerImpl struct {
	proto_sentry.UnimplementedSentryServer
	// contains filtered or unexported fields
}

func (*SentryServerImpl) PeerMinBlock

func (*SentryServerImpl) PenalizePeer

func (*SentryServerImpl) ReceiveMessages

func (*SentryServerImpl) ReceiveUploadMessages

func (*SentryServerImpl) SendMessageById

func (*SentryServerImpl) SendMessageByMinBlock

func (*SentryServerImpl) SendMessageToAll

func (*SentryServerImpl) SetStatus

func (ss *SentryServerImpl) SetStatus(_ context.Context, statusData *proto_sentry.StatusData) (*emptypb.Empty, error)

type StreamMsg

type StreamMsg struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL