testcontainers

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package testcontainers provides implementations of the privatebtc.NodeService and privatebtc.NodeHandler interfaces the using the https://github.com/testcontainers/testcontainers-go package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NodeHandler

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

NodeHandler represents a bitcoin node running in a docker container.

func (NodeHandler) Close

func (c NodeHandler) Close() error

Close terminates the container.

func (NodeHandler) HostRPCPort

func (c NodeHandler) HostRPCPort() string

HostRPCPort returns the host RPC port of the container.

func (NodeHandler) InternalIP

func (c NodeHandler) InternalIP() string

InternalIP returns the IP address of the container.

func (NodeHandler) Name

func (c NodeHandler) Name() string

Name returns the container name.

type NodeService

type NodeService struct {
	SlogHandler slog.Handler
	// contains filtered or unexported fields
}

NodeService is a testcontainers implementation of go-privatebtc.NodeService. It is used to create containers.

func (*NodeService) CreateNodes

func (s *NodeService) CreateNodes(
	ctx context.Context,
	nodeRequests []privatebtc.CreateNodeRequest,
) ([]privatebtc.NodeHandler, error)

CreateNodes creates bitcoin node containers in parallel.

Jump to

Keyboard shortcuts

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