engineutil

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: May 1, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package engineutil contains shared helpers for database engine implementations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClientImage

func ClientImage(configured, fallback string) string

ClientImage returns the configured dump helper image or the engine fallback.

func DumpHostConfig

func DumpHostConfig(destPath string) *container.HostConfig

DumpHostConfig mounts the dump directory at /dump for helper containers.

func NetworkConfig

func NetworkConfig(name string) *network.NetworkingConfig

NetworkConfig attaches helper containers to the source network when needed.

func RequireDocker

func RequireDocker(prefix string, docker *client.Client) error

RequireDocker preserves each engine's existing nil-runtime validation.

func WaitReady

func WaitReady(req ReadyRequest) error

WaitReady polls TCP first, then SELECT 1, matching the engine-specific behavior that used to live in each implementation.

Types

type ReadyRequest

type ReadyRequest struct {
	Prefix     string
	DriverName string
	Connection engine.ConnectionConfig
	Timeout    time.Duration
	DSN        string
}

ReadyRequest contains the engine-specific details needed by WaitReady.

Jump to

Keyboard shortcuts

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