app

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: May 15, 2019 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BeaconApp

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

BeaconApp contains all the high level states and workflow for P2P module

func NewBeaconApp

func NewBeaconApp(config Config) *BeaconApp

NewBeaconApp creates a new instance of BeaconApp

func (BeaconApp) Exit

func (app BeaconApp) Exit()

Exit sends a request to exit the application.

func (*BeaconApp) GetHostNode

func (app *BeaconApp) GetHostNode() *p2p.HostNode

GetHostNode gets the host node

func (*BeaconApp) Run

func (app *BeaconApp) Run() error

Run runs the main loop of BeaconApp

func (*BeaconApp) WaitForConnections

func (app *BeaconApp) WaitForConnections(numConnections int)

WaitForConnections waits until beacon app is connected

type Config

type Config struct {
	RPCAddress             string
	GenesisTime            uint64
	DataDirectory          string
	InitialValidatorList   []beacon.InitialValidatorEntry
	NetworkConfig          *config.Config
	Resync                 bool
	IsIntegrationTest      bool
	InitialSyncConnections int
	ListeningAddress       string
	MinPeerCountToWait     int
	HeartBeatInterval      time.Duration
	TimeOutInterval        time.Duration
	DiscoveryOptions       p2p.DiscoveryOptions
	MaxPeers               int
}

Config is the config of an BeaconApp

func NewConfig

func NewConfig() Config

NewConfig creates a default Config

Jump to

Keyboard shortcuts

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