postgres

package
v0.13.10 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2026 License: MIT Imports: 11 Imported by: 3

Documentation

Index

Constants

View Source
const (
	User              = "chainlink"
	Password          = "thispasswordislongenough"
	Port              = "5432"
	ExposedStaticPort = 13000
	Database          = "chainlink"
	JDDatabase        = "job-distributor-db"
	DBVolumeName      = "postgresql_data"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Input

type Input struct {
	// Image PostgreSQL Docker image in format: $registry:$tag
	Image string `toml:"image" validate:"required" comment:"PostgreSQL Docker image in format: $registry:$tag"`
	// Port PostgreSQL connection port
	Port int `toml:"port" comment:"PostgreSQL connection port"`
	// Name PostgreSQL container name
	Name string `toml:"name" comment:"PostgreSQL container name"`
	// VolumeName PostgreSQL Docker volume name
	VolumeName string `toml:"volume_name" comment:"PostgreSQL docker volume name"`
	// Databases number of pre-created databases for Chainlink nodes
	Databases int `toml:"databases" comment:"Number of pre-created databases for Chainlink nodes"`
	// JDDatabase whether to create JobDistributor database or not
	JDDatabase bool `toml:"jd_database" comment:"Whether to create JobDistributor database or not"`
	// JDSQLDumpPath JobDistributor SQL dump path to load
	JDSQLDumpPath string `toml:"jd_sql_dump_path" comment:"JobDistributor database dump path to load"`
	// PullImage whether to pull PostgreSQL image or not
	PullImage bool `toml:"pull_image" comment:"Whether to pull PostgreSQL image or not"`
	// ContainerResources Docker container resources
	ContainerResources *framework.ContainerResources `toml:"resources" comment:"Docker container resources"`
	// Out PostgreSQL config output
	Out *Output `toml:"out" comment:"PostgreSQL config output"`
}

type Output

type Output struct {
	// URL PostgreSQL connection URL
	Url string `toml:"url" comment:"PostgreSQL connection URL"`
	// ContainerName PostgreSQL Docker container name
	ContainerName string `toml:"container_name" comment:"Docker container name"`
	// InternalURL PostgreSQL internal connection URL
	InternalURL string `toml:"internal_url" comment:"PostgreSQL internal connection URL"`
	// JDUrl PostgreSQL external connection URL to JobDistributor database
	JDUrl string `toml:"jd_url" comment:"PostgreSQL internal connection URL to JobDistributor database"`
	// JDInternalURL PostgreSQL internal connection URL to JobDistributor database
	JDInternalURL string `toml:"jd_internal_url" comment:"PostgreSQL internal connection URL to JobDistributor database"`
}

func NewPostgreSQL

func NewPostgreSQL(in *Input) (*Output, error)

func NewWithContext added in v0.11.6

func NewWithContext(ctx context.Context, in *Input) (*Output, error)

Jump to

Keyboard shortcuts

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