Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CommitHandler ¶
CommitHandler ...
type ExceptionHandler ¶
type ExceptionHandler interface {
OnException(string)
}
ExceptionHandler ...
type MobileConfig ¶
type MobileConfig struct {
Heartbeat int //heartbeat timeout in milliseconds
SlowHeartbeat int //slow-heartbeat in milliseconds
TCPTimeout int //TCP timeout in milliseconds
MaxPool int //Max number of pooled connections
CacheSize int //Number of items in LRU cache
SyncLimit int //Max Events per sync
EnableFastSync bool //Enable fast sync
Store bool //Use badger store
LogLevel string //debug, info, warn, error, fatal, panic
DatabaseDir string //path to BadgerDB
Bootstrap bool // Bootstrap node
Moniker string //optional name
SuspendLimit int //number of undetermined-events before suspension
}
MobileConfig is shortly to be deprecated. It was used to pass mobile configuration parameters from android (/ other OS) to babble. It will be replaced by the load config options included above
type Node ¶
type Node struct {
// contains filtered or unexported fields
}
Node is the object that mobile consumers interact with.
func New ¶
func New( commitHandler CommitHandler, exceptionHandler ExceptionHandler, configDir string, ) *Node
New initializes Node struct
func (*Node) GetGenesisPeers ¶ added in v0.6.0
GetGenesisPeers returns the genesis peers.
func (*Node) Leave ¶ added in v0.5.0
func (n *Node) Leave()
Leave instructs the node to leave politely (get removed from validator-set) before shutting down.
Click to show internal directories.
Click to hide internal directories.