chdocker

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package chdocker creates one-off ClickHouse docker containers so pggen can introspect a schema. The generic container plumbing lives in internal/dbdocker; this supplies the ClickHouse-specific parts.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client controls a running ClickHouse Docker container.

func Start

func Start(ctx context.Context, initScripts []string) (*Client, error)

Start builds a Docker image with the schema files as init scripts and runs it in a container.

func (*Client) ConnString

func (c *Client) ConnString() string

ConnString returns the DSN for the started ClickHouse container.

func (*Client) GetContainerLogs

func (c *Client) GetContainerLogs() (string, error)

GetContainerLogs returns all stderr and stdout logs for the container.

func (*Client) Stop

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

Stop stops the running container, if any.

Jump to

Keyboard shortcuts

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