dockerdb

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Start

func Start(dockerArgs, driverName, dataSourceName string) io.Closer

Run docker with the given args, then wait for the given database to be ready. Start returns an io.Closer interface. The caller must call Close when the docker container is no longer needed, and should be terminated. Here is an example invocation:

defer dockerdb.Start(
  "-p 26257:26257 cockroachdb/cockroach:v20.2.4 start-single-node --insecure",
  "postgres",
  "postgresql://root@localhost:26257?sslmode=disable",
).Close()

Types

This section is empty.

Jump to

Keyboard shortcuts

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