minimal

package
v0.0.0-...-8f649d9 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2020 License: LGPL-3.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	DiscoveryBackends map[string]discovery.Factory
	DiscoveryEntries  map[string]*Entry

	ProtocolBackends map[string]protocol.Factory
	ProtocolEntries  map[string]*Entry

	BlockchainBackends map[string]storage.Factory
	BlockchainEntries  map[string]*Entry

	ConsensusBackends map[string]consensus.Factory
	ConsensusEntry    *Entry

	APIBackends map[string]api.Factory
	APIEntries  map[string]*Entry

	Keystore keystore.Keystore
	Chain    *chain.Chain

	BindAddr string
	BindPort int

	RPCAddr string
	RPCPort int

	DataDir     string
	ServiceName string
	Seal        bool

	StateStorage string
}

Config is used to parametrize the minimal client

type Entry

type Entry struct {
	Enabled bool
	Config  map[string]interface{}
}

Entry is a backend configuration entry

type Minimal

type Minimal struct {
	Sealer *sealer.Sealer

	Blockchain *blockchain.Blockchain
	Key        *ecdsa.PrivateKey

	InmemSink *metrics.InmemSink
	// contains filtered or unexported fields
}

Minimal is the central manager of the blockchain client

func NewMinimal

func NewMinimal(logger hclog.Logger, config *Config) (*Minimal, error)

func (*Minimal) Chain

func (m *Minimal) Chain() *chain.Chain

Chain returns the chain object of the client

func (*Minimal) Close

func (m *Minimal) Close()

func (*Minimal) Server

func (m *Minimal) Server() *network.Server

Server returns the p2p server

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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