Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommitHandler ¶
CommitHandler is called when Lachesis has committed a block to the DAG and publishes that message to the mobile app. It returns the state hash resulting from applying the block's transactions to the state.
type ExceptionHandler ¶
type ExceptionHandler interface {
OnException(string)
}
ExceptionHandler handles mobile app mobile app exceptions.
type MobileConfig ¶
type MobileConfig struct { Heartbeat int //heartbeat timeout 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 StoreType string //inmem or badger StorePath string //File containing the Store DB }
MobileConfig stores all the configuration information for a mobile node
func DefaultMobileConfig ¶
func DefaultMobileConfig() *MobileConfig
DefaultMobileConfig sets the default config
func NewMobileConfig ¶
func NewMobileConfig(heartbeat int, tcpTimeout int, maxPool int, cacheSize int, syncLimit int, storeType string, storePath string) *MobileConfig
NewMobileConfig creates a new mobile config
type Node ¶
type Node struct {
// contains filtered or unexported fields
}
Node struct
func New ¶
func New(privKey string, nodeAddr string, participants *peers.Peers, commitHandler CommitHandler, exceptionHandler ExceptionHandler, config *MobileConfig) *Node
New initializes Node struct
Click to show internal directories.
Click to hide internal directories.