postgres

package
v0.17.3 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2026 License: MIT Imports: 14 Imported by: 3 modules, 4 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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"`
	// K8sService is a Kubernetes service spec used to connect locally
	K8sService *v1.Service `toml:"k8s_service" comment:"Kubernetes service spec used to connect locally"`
}

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