Documentation
¶
Overview ¶
Package docker is the Docker plugin, which provides the block types docker "network" and docker "container" and creates them as real Docker networks and containers.
Plugin is importable: a host registers it in-process with registry.Local.RegisterPlugin(&docker.Plugin{}), and cmd/docker serves the same type as a separate program. The block types live in entities, the providers in providers and the Docker client layer in client. A program that only reads the blocks it applied imports entities alone.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Plugin ¶
type Plugin struct {
plugins.PluginBase
}
Plugin provides the block types docker "network" and docker "container". cmd/docker serves it as an external plugin.
func (*Plugin) Init ¶
Init builds the Docker client from the environment, and the container task layer over it once, then registers both block types, each with a provider sharing that task layer. Building them does not contact Docker, the providers do when they are called.
logger is plugin scoped, for messages written outside a provider call like this one. xcl adds provider=<block subtype> to what each provider's Init logs. During a call the providers log through plugins.Logger(ctx) instead, which xcl binds to the resource and step being worked on.
Directories
¶
| Path | Synopsis |
|---|---|
|
client
|
|
|
containers
Package containers is the Docker plugin's container task layer, the one place the plugin turns what its providers want done into Docker Engine SDK calls: creating and removing networks, pulling images, creating, starting and removing containers, and moving containers between networks.
|
Package containers is the Docker plugin's container task layer, the one place the plugin turns what its providers want done into Docker Engine SDK calls: creating and removing networks, pulling images, creating, starting and removing containers, and moving containers between networks. |
|
docker
Package docker is the Docker Engine client the Docker plugin's container task layer, client/containers, uses to create real networks and containers.
|
Package docker is the Docker Engine client the Docker plugin's container task layer, client/containers, uses to create real networks and containers. |
|
cmd
|
|
|
docker
command
Command docker serves the Docker plugin, an external xcl plugin that creates real Docker networks and containers.
|
Command docker serves the Docker plugin, an external xcl plugin that creates real Docker networks and containers. |
|
Package entities holds the Docker plugin's block types, docker "network" and docker "container", and nothing else: no providers, no Docker client and no Docker libraries.
|
Package entities holds the Docker plugin's block types, docker "network" and docker "container", and nothing else: no providers, no Docker client and no Docker libraries. |
|
Package providers holds the Docker plugin's resource providers, which create docker "network" and docker "container" blocks as real Docker networks and containers.
|
Package providers holds the Docker plugin's resource providers, which create docker "network" and docker "container" blocks as real Docker networks and containers. |