babble

package
v0.5.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const DefaultKeyfile = "priv_key"

DefaultKeyfile ...

Variables

This section is empty.

Functions

func DefaultDataDir

func DefaultDataDir() string

DefaultDataDir ...

func HomeDir

func HomeDir() string

HomeDir ...

func LogLevel

func LogLevel(l string) logrus.Level

LogLevel ...

Types

type Babble

type Babble struct {
	Config       *BabbleConfig
	Node         *node.Node
	Transport    net.Transport
	Store        h.Store
	Peers        *peers.PeerSet
	GenesisPeers *peers.PeerSet
	Service      *service.Service
}

Babble is a struct containing the key parts of a babble node

func NewBabble

func NewBabble(config *BabbleConfig) *Babble

NewBabble is a factory method to produce a Babble instance.

func (*Babble) Init

func (b *Babble) Init() error

Init initialises the babble engine

func (*Babble) Run

func (b *Babble) Run()

Run starts the Babble Node running

type BabbleConfig

type BabbleConfig struct {
	NodeConfig node.Config `mapstructure:",squash"`

	DataDir     string `mapstructure:"datadir"`
	BindAddr    string `mapstructure:"listen"`
	ServiceAddr string `mapstructure:"service-listen"`
	MaxPool     int    `mapstructure:"max-pool"`
	Store       bool   `mapstructure:"store"`
	LogLevel    string `mapstructure:"log"`
	Moniker     string `mapstructure:"moniker"`

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

BabbleConfig ...

func NewDefaultConfig

func NewDefaultConfig() *BabbleConfig

NewDefaultConfig ...

func (*BabbleConfig) BadgerDir

func (c *BabbleConfig) BadgerDir() string

BadgerDir ...

func (*BabbleConfig) Keyfile added in v0.5.0

func (c *BabbleConfig) Keyfile() string

Keyfile ...

Jump to

Keyboard shortcuts

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