docker

package
v0.0.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Container

type Container struct {
	ID       string
	Host     string
	Port     string
	User     string
	Password string
	Database string
	// contains filtered or unexported fields
}

Container represents a running PostgreSQL Docker container.

func StartPostgres

func StartPostgres(ctx context.Context, image string) (*Container, error)

StartPostgres starts a PostgreSQL-compatible container with the given image. The image parameter should be a full image reference (e.g. "postgres:18", "citusdata/citus:12.1"). If the image exists locally it is used directly; otherwise it is pulled from the registry.

func (*Container) ConnURL

func (c *Container) ConnURL() string

ConnURL returns a pgx-compatible connection string.

func (*Container) Stop

func (c *Container) Stop(ctx context.Context) error

Stop stops and removes the container.

Jump to

Keyboard shortcuts

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