node

package
v1.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 26, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package node provides a wrapper around the Node service used for E2E tests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Node

type Node struct {
	// contains filtered or unexported fields
}

func New

func New(ctx context.Context, logger *zap.Logger, opts Options) (*Node, error)

func (*Node) Alias

func (n *Node) Alias() string

func (*Node) Container

func (n *Node) Container() testcontainers.Container

Container returns the underlying testcontainer for advanced use cases.

func (*Node) DBConnectionString

func (n *Node) DBConnectionString() string

func (*Node) ExternalAddr

func (n *Node) ExternalAddr() string

func (*Node) InternalAddr

func (n *Node) InternalAddr() string

func (*Node) NodeID

func (n *Node) NodeID() uint32

func (*Node) Restart

func (n *Node) Restart(ctx context.Context) (*Node, error)

Restart creates a new container with the same configuration as the original. Returns a new Node instance; the caller should replace its reference. This is used to bring a stopped node back online while preserving its identity.

func (*Node) SetNodeID

func (n *Node) SetNodeID(id uint32)

func (*Node) SignerKey

func (n *Node) SignerKey() string

func (*Node) Stop

func (n *Node) Stop(ctx context.Context) error

type Options

type Options struct {
	Image     string
	ID        string
	Alias     string
	WsURL     string
	RPCURL    string
	SignerKey string
	EnvVars   map[string]string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL