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 ¶
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.