core

package
v0.0.2-alpha Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2020 License: LGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Chain

type Chain interface {
	Start() error // Start chain
	SetRouter(*router.Router)
	Id() msg.ChainId
	Name() string
	Stop()
}

type ChainConfig

type ChainConfig struct {
	Name           string            // Human-readable chain name
	Id             msg.ChainId       // ChainID
	Endpoint       string            // url for rpc endpoint
	From           string            // address of key to use
	KeystorePath   string            // Location of key files
	Insecure       bool              // Indicated whether the test keyring should be used
	BlockstorePath string            // Location of blockstore
	FreshStart     bool              // If true, blockstore is ignored at start.
	LatestBlock    bool              // If true, overrides blockstore or latest block in config and starts from current block
	Opts           map[string]string // Per chain options
}

type Core

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

func NewCore

func NewCore(sysErr <-chan error) *Core

func (*Core) AddChain

func (c *Core) AddChain(chain Chain)

AddChain registers the chain in the registry and calls Chain.SetRouter()

func (*Core) Errors

func (c *Core) Errors() <-chan error

func (*Core) Start

func (c *Core) Start()

Start will call all registered chains' Start methods and block forever (or until signal is received)

Jump to

Keyboard shortcuts

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