Versions in this module Expand all Collapse all v0 v0.0.0 Mar 14, 2022 Changes in this version + func RegisterLifecycles(lifecycles LifecycleConstructors) + type ExecAdapter struct + BaseDir string + func NewExecAdapter(baseDir string) *ExecAdapter + func (e *ExecAdapter) Name() string + func (e *ExecAdapter) NewNode(config *NodeConfig) (Node, error) + type ExecNode struct + Cmd *exec.Cmd + Config *execNodeConfig + Dir string + ID enode.ID + Info *p2p.NodeInfo + func (n *ExecNode) Addr() []byte + func (n *ExecNode) Client() (*rpc.Client, error) + func (n *ExecNode) NodeInfo() *p2p.NodeInfo + func (n *ExecNode) ServeRPC(clientConn *websocket.Conn) error + func (n *ExecNode) Snapshots() (map[string][]byte, error) + func (n *ExecNode) Start(snapshots map[string][]byte) (err error) + func (n *ExecNode) Stop() error + type LifecycleConstructor func(ctx *ServiceContext, stack *node.Node) (node.Lifecycle, error) + type LifecycleConstructors map[string]LifecycleConstructor + type Node interface + Addr func() []byte + Client func() (*rpc.Client, error) + NodeInfo func() *p2p.NodeInfo + ServeRPC func(*websocket.Conn) error + Snapshots func() (map[string][]byte, error) + Start func(snapshots map[string][]byte) error + Stop func() error + type NodeAdapter interface + Name func() string + NewNode func(config *NodeConfig) (Node, error) + type NodeConfig struct + DataDir string + EnableMsgEvents bool + ExternalSigner string + ID enode.ID + Lifecycles []string + LogFile string + LogVerbosity log.Lvl + Name string + Port uint16 + PrivateKey *ecdsa.PrivateKey + Properties []string + Reachable func(id enode.ID) bool + Record enr.Record + func RandomNodeConfig() *NodeConfig + func (n *NodeConfig) MarshalJSON() ([]byte, error) + func (n *NodeConfig) Node() *enode.Node + func (n *NodeConfig) UnmarshalJSON(data []byte) error + type RPCDialer interface + DialRPC func(id enode.ID) (*rpc.Client, error) + type ServiceContext struct + Config *NodeConfig + Snapshot []byte + type SimAdapter struct + func NewSimAdapter(services LifecycleConstructors) *SimAdapter + func (s *SimAdapter) Dial(ctx context.Context, dest *enode.Node) (conn net.Conn, err error) + func (s *SimAdapter) DialRPC(id enode.ID) (*rpc.Client, error) + func (s *SimAdapter) GetNode(id enode.ID) (*SimNode, bool) + func (s *SimAdapter) Name() string + func (s *SimAdapter) NewNode(config *NodeConfig) (Node, error) + type SimNode struct + ID enode.ID + func (sn *SimNode) Addr() []byte + func (sn *SimNode) Client() (*rpc.Client, error) + func (sn *SimNode) Close() error + func (sn *SimNode) Node() *enode.Node + func (sn *SimNode) NodeInfo() *p2p.NodeInfo + func (sn *SimNode) ServeRPC(conn *websocket.Conn) error + func (sn *SimNode) Server() *p2p.Server + func (sn *SimNode) Service(name string) node.Lifecycle + func (sn *SimNode) ServiceMap() map[string]node.Lifecycle + func (sn *SimNode) Services() []node.Lifecycle + func (sn *SimNode) Snapshots() (map[string][]byte, error) + func (sn *SimNode) Start(snapshots map[string][]byte) error + func (sn *SimNode) Stop() error + func (sn *SimNode) SubscribeEvents(ch chan *p2p.PeerEvent) event.Subscription + type SnapshotAPI struct + func (api SnapshotAPI) Snapshot() (map[string][]byte, error)