app

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 17, 2019 License: MIT Imports: 15 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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