package
0.2.0
Repository: https://github.com/coderink/gttc.git
Documentation: pkg.go.dev

# Functions

NewDockerAdapter builds the p2p-node Docker image containing the current binary and returns a DockerAdapter.
NewExecAdapter returns an ExecAdapter which stores node data in subdirectories of the given base directory.
NewSimAdapter creates a SimAdapter which is capable of running in-memory simulation nodes running any of the given services (the services to run on a particular node are passed to the NewNode function in the NodeConfig).
No description provided by the author
RandomNodeConfig returns node configuration with a randomly generated ID and PrivateKey.
RegisterServices registers the given Services which can then be used to start devp2p nodes using either the Exec or Docker adapters.

# Structs

DockerAdapter is a NodeAdapter which runs simulation nodes inside Docker containers.
DockerNode wraps an ExecNode but exec's the current binary in a docker container rather than locally.
ExecAdapter is a NodeAdapter which runs simulation nodes by executing the current binary as a child process.
ExecNode starts a simulation node by exec'ing the current binary and running the configured services.
NodeConfig is the configuration used to start a node in a simulation network.
ServiceContext is a collection of options and methods which can be utilised when starting services.
SimAdapter is a NodeAdapter which creates in-memory simulation nodes and connects them using in-memory net.Pipe connections.
SimNode is an in-memory simulation node which connects to other nodes using an in-memory net.Pipe connection (see SimAdapter.Dial), running devp2p protocols directly over that pipe.
No description provided by the author
SnapshotAPI provides an RPC method to create snapshots of services.

# Interfaces

Node represents a node in a simulation network which is created by a NodeAdapter, for example: * SimNode - An in-memory node * ExecNode - A child process node * DockerNode - A Docker container node .
NodeAdapter is used to create Nodes in a simulation network.
RPCDialer is used when initialising services which need to connect to other nodes in the network (for example a simulated Swarm node which needs to connect to a Geth node to resolve ENS names).

# Type aliases

ServiceFunc returns a node.Service which can be used to boot a devp2p node.
Services is a collection of services which can be run in a simulation.