Documentation
¶
Overview ¶
Package node contains classes for running a turbo-geth node.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Params ¶
type Params struct {
GitCommit string
GitBranch string
CustomBuckets dbutils.BucketsCfg
}
Params contains optional parameters for creating a node. * GitCommit is a commit from which then node was built. * CustomBuckets is a `map[string]dbutils.BucketConfigItem`, that contains bucket name and its properties.
NB: You have to declare your custom buckets here to be able to use them in the app.
type TurboGethNode ¶
type TurboGethNode struct {
// contains filtered or unexported fields
}
TurboGethNode represents a single node, that runs sync and p2p network. it also can export the private endpoint for RPC daemon, etc.
func New ¶
func New( ctx *cli.Context, sync *stagedsync.StagedSync, optionalParams Params, ) *TurboGethNode
New creates a new `TurboGethNode`. * ctx - `*cli.Context` from the main function. Necessary to be able to configure the node based on the command-line flags * sync - `stagedsync.StagedSync`, an instance of staged sync, setup just as needed. * optionalParams - additional parameters for running a node.
func (*TurboGethNode) Serve ¶
func (tg *TurboGethNode) Serve() error
Serve runs the node and blocks the execution. It returns when the node is existed.
func (*TurboGethNode) SetP2PListenFunc ¶
func (tg *TurboGethNode) SetP2PListenFunc(listenFunc func(network, addr string) (net.Listener, error))