Help us shape the future of Go! Take the 2026 Go Developer Survey

duckdb

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package duckdb runs DuckDB in a container for the services that execute SQL on it (Athena, BigQuery): a Python image with DuckDB, started on the first query, serving the Script the service gives it on port 8080.

Index

Constants

This section is empty.

Variables

View Source
var ErrNoDocker = errors.New("pogi: Docker is not available, so queries cannot run")

ErrNoDocker is why a query cannot run without a container engine: Start's error for that matches it with errors.Is.

Functions

This section is empty.

Types

type Engine

type Engine struct {
	Hub     *core.Hub
	Name    string // what the user knows the service as ("Athena"), for errors
	Service string // the label of the container and of its data directory
	Script  string // the Python program the container runs: a server on port 8080 that answers GET / with 200
	// contains filtered or unexported fields
}

Engine is the DuckDB container: started on the first query, kept for the life of the service and removed when it closes.

func (*Engine) Close

func (e *Engine) Close()

Close removes the container and its data directory.

func (*Engine) Forget

func (e *Engine) Forget()

Forget drops a container that stopped answering; the next query starts another.

func (*Engine) Start

func (e *Engine) Start(ctx context.Context) (string, string, error)

Start runs the engine and returns its URL and the host directory it mounts at /data. The image is built on first use (pip needs the network then) and committed, so later starts are offline.

Jump to

Keyboard shortcuts

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