docker

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package docker is a dfetch Connector backed by the Docker Engine API. It exposes the containers, images, volumes, and networks tables under the SQL schema "docker", talking to the local daemon over its unix socket.

The connector does no push-down: each scan fetches the full resource list and emits it as one chunk, and SQLite re-applies the query. Returning a superset is always correct, and the Docker list endpoints are small and unpaginated.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(params map[string]any) (source.Connector, error)

New builds a Docker connector. Supported params: "socket" (override the unix socket path) and "base_url" (an http(s) URL to a TCP daemon or test server, which takes precedence over the socket). New(nil) defaults to the local socket and never dials, so dfetch works even when Docker isn't running — only docker.* queries fail.

Types

type Connector

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

Connector talks to the Docker Engine API. baseURL is a dummy host ("http://docker") when dialing the unix socket, or a real http(s) URL when a base_url override points at a TCP daemon or a test server.

func (*Connector) Scan

func (c *Connector) Scan(ctx context.Context, req source.ScanRequest, emit func(*source.Rows) error) error

Scan dispatches to the per-table fetchers. Each emits the full list as one chunk.

func (*Connector) Tables

func (c *Connector) Tables() []source.TableSchema

Tables returns the schemas of the docker.* tables.

Jump to

Keyboard shortcuts

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