mirror of
https://github.com/docker/compose.git
synced 2026-11-17 13:45:39 +00:00
Running a provider plugin (finding its binary, executing it, serving the JSON messages it sends, applying the variables and endpoints it publishes, streaming it an image) needs from the engine the Docker API, the event bus, the Docker CLI that locates the plugin, the preparation of the environment of a shelled-out command, and the lock that guards the project model every concurrent provider run mutates. It now lives in internal/provider behind a Backend interface that composeService implements in pkg/compose/plugins.go, next to runPlugin, which stays as a one-line forwarder so none of its callers (up, down, stop, pull) changes. The relay it deploys goes through internal/relay, whose Backend the new one extends. The public types and constants of the protocol (JsonMessage, ProviderMetadata, the *Type message constants...) stay exported from pkg/compose as aliases of the new package's. The tests of the plugin protocol move with the code, assertions unchanged; those of the provider image phase and of the relay link network removal stay in pkg/compose. The forwarders to the relay that only the plugin code used are dropped. Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com> |
||
|---|---|---|
| .. | ||
| progress.go | ||
| progress_test.go | ||