netrunner

package
v1.16.37 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2025 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Overview

Package netrunner provides integration with the Lux netrunner tool for managing test networks and blockchain deployments.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client wraps the netrunner client with additional functionality

func NewClient

func NewClient(config *Config, logger log.Logger) (*Client, error)

NewClient creates a new netrunner client

func (*Client) AddNode

func (c *Client) AddNode(ctx context.Context, name string, execPath string, opts ...client.OpOption) (*rpcpb.AddNodeResponse, error)

AddNode adds a new node to the network

func (*Client) Close

func (c *Client) Close() error

Close closes the netrunner client connection

func (*Client) CreateChains added in v1.3.8

func (c *Client) CreateChains(ctx context.Context, specs []*rpcpb.BlockchainSpec) (*rpcpb.CreateBlockchainsResponse, error)

CreateChains creates new blockchains with the given specifications

func (*Client) Health

func (c *Client) Health(ctx context.Context) (*rpcpb.HealthResponse, error)

Health checks the health of the network

func (*Client) RemoveNode

func (c *Client) RemoveNode(ctx context.Context, name string) error

RemoveNode removes a node from the network

func (*Client) RestartNode

func (c *Client) RestartNode(ctx context.Context, name string, opts ...client.OpOption) error

RestartNode restarts a node in the network

func (*Client) Start

func (c *Client) Start(ctx context.Context, execPath string, opts ...client.OpOption) (*rpcpb.StartResponse, error)

Start starts a new network with the given configuration

func (*Client) Status

func (c *Client) Status(ctx context.Context) (*rpcpb.StatusResponse, error)

Status returns the current network status

func (*Client) Stop

func (c *Client) Stop(ctx context.Context) error

Stop stops the running network

func (*Client) URIs

func (c *Client) URIs(ctx context.Context) ([]string, error)

URIs returns the URIs of all nodes in the network

func (*Client) WaitForHealthy

func (c *Client) WaitForHealthy(ctx context.Context, timeout time.Duration) error

WaitForHealthy waits for all nodes in the network to be healthy

type Config

type Config struct {
	Endpoint    string
	DialTimeout time.Duration
	LogLevel    string
}

Config holds configuration for the netrunner client

func DefaultConfig

func DefaultConfig() *Config

DefaultConfig returns default netrunner configuration

Jump to

Keyboard shortcuts

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