Documentation ¶
Overview ¶
Package deps provides mechanisms to run Node dependencies using docker
Index ¶
- Constants
- func Terminate(ctx context.Context, depContainers *DepsContainers) error
- type DepsConfig
- type DepsContainers
- func (depContainers *DepsContainers) DevnetEndpoint(ctx context.Context, protocol string) (string, error)
- func (depContainers *DepsContainers) DevnetLogs(ctx context.Context) (io.ReadCloser, error)
- func (depContainers *DepsContainers) PostgresEndpoint(ctx context.Context, protocol string) (string, error)
- func (depContainers *DepsContainers) PostgresLogs(ctx context.Context) (io.ReadCloser, error)
- type DevnetConfig
- type PostgresConfig
Constants ¶
View Source
const ( DefaultPostgresDatabase = "postgres" DefaultPostgresDockerImage = "postgres:16-alpine" DefaultPostgresPort = "5432" DefaultPostgresUser = "postgres" DefaultPostgresPassword = "password" DefaultDevnetDockerImage = "cartesi/rollups-node-devnet:devel" DefaultDevnetPort = "8545" DefaultDevnetBlockTime = "1" DefaultDevnetBlockToWaitForOnStartup = "21" DefaultDevnetNoMining = false )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DepsConfig ¶
type DepsConfig struct { Postgres *PostgresConfig Devnet *DevnetConfig }
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
func (*DepsContainers) DevnetEndpoint ¶ added in v1.5.0
func (*DepsContainers) DevnetLogs ¶ added in v1.5.0
func (depContainers *DepsContainers) DevnetLogs(ctx context.Context) (io.ReadCloser, error)
func (*DepsContainers) PostgresEndpoint ¶ added in v1.5.0
func (*DepsContainers) PostgresLogs ¶ added in v1.5.0
func (depContainers *DepsContainers) PostgresLogs(ctx context.Context) (io.ReadCloser, error)
type DevnetConfig ¶ added in v1.4.0
type PostgresConfig ¶ added in v1.4.0
Click to show internal directories.
Click to hide internal directories.