deps

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package deps provides mechanisms to run Node dependencies using docker

Index

Constants

View Source
const (
	DefaultPostgresDockerImage = "postgres:16-alpine"
	DefaultPostgresPort        = "5432"
	DefaultPostgresPassword    = "password"
	DefaultDevnetDockerImage   = "cartesi/rollups-devnet:devel"
	DefaultDevnetPort          = "8545"
)

Variables

This section is empty.

Functions

func Terminate

func Terminate(ctx context.Context, depContainers *DepsContainers) error

Terminate terminates all dependencies containers. This method waits for all the containers to terminate or gives an error if it fails to terminate one of the containers

Types

type DepsConfig

type DepsConfig struct {
	PostgresDockerImage string
	PostgresPort        string
	PostgresPassword    string
	DevnetDockerImage   string
	DevnetPort          string
}

Struct to hold Node dependencies containers configurations

func NewDefaultDepsConfig

func NewDefaultDepsConfig() *DepsConfig

Builds a DepsConfig struct with default values

type DepsContainers

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

Struct to represent the Node dependencies containers

func Run

func Run(ctx context.Context, depsConfig DepsConfig) (*DepsContainers, error)

Run starts the Node dependencies containers. The returned DepContainers struct can be used to gracefully terminate the containers using the Terminate method

Jump to

Keyboard shortcuts

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