lachesis

package
v0.0.0-...-168a2c3 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultBadgerDir

func DefaultBadgerDir() string

func DefaultDataDir

func DefaultDataDir() string

func HomeDir

func HomeDir() string

func Keygen

func Keygen(datadir string) (*ecdsa.PrivateKey, error)

Keygen generates a new key pair

func LogLevel

func LogLevel(l string) logrus.Level

Types

type Lachesis

type Lachesis struct {
	Config    *LachesisConfig
	Node      *node.Node
	Transport peer.SyncPeer
	Store     poset.Store
	Peers     *peers.Peers
	Service   *service.Service
}

Lachesis struct

func NewLachesis

func NewLachesis(config *LachesisConfig) *Lachesis

NewLachesis constructor

func (*Lachesis) Init

func (l *Lachesis) Init() error

Init initializes the lachesis node

func (*Lachesis) Run

func (l *Lachesis) Run()

Run hosts the services for the lachesis node

type LachesisConfig

type LachesisConfig struct {
	DataDir     string `mapstructure:"datadir"`
	BindAddr    string `mapstructure:"listen"`
	ServiceAddr string `mapstructure:"service-listen"`
	ServiceOnly bool   `mapstructure:"service-only"`
	MaxPool     int    `mapstructure:"max-pool"`
	Store       bool   `mapstructure:"store"`
	LogLevel    string `mapstructure:"log"`

	NodeConfig node.Config `mapstructure:",squash"`
	PoSConfig  pos.Config  `mapstructure:",squash"`

	LoadPeers bool
	Proxy     proxy.AppProxy
	Key       *ecdsa.PrivateKey
	Logger    *logrus.Logger

	ConnFunc peer.CreateNetConnFunc

	Test      bool   `mapstructure:"test"`
	TestN     uint64 `mapstructure:"test_n"`
	TestDelay uint64 `mapstructure:"test_delay"`
}

func NewDefaultConfig

func NewDefaultConfig() *LachesisConfig

func (*LachesisConfig) BadgerDir

func (c *LachesisConfig) BadgerDir() string

Jump to

Keyboard shortcuts

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