Some of the language and structure in Pygmy has been bugging me for a while - years in fact. I've had some ideas how to fix this longer term but actually doing it has proved difficult more than once over the years. Seems I have been getting better at Go as I've managed to unpick this one quite nicely.
Now, things are more logically segmented between
Service Management (the management of individual services)
Runtime Management (the explicit use of a runtime and storing all associated functionality where it makes sense)
External Entry-points (using Pygmy as a library).
Commands have moved, so external applications which use this functionality will need to adjust slightly (examples include the Lagoon CLI and possibly others).
Internal Entry-points (using Pygmy as a binary).
Things that still need to be wiggled
Moving non-commands out of the commands directory (internal and external pathways)
More long term, support for other containerization run-times and a mechanism for choosing the runtime
out of scope for this change.
The following other things should be considered
This change facilitates the implementation of new container run-times.
This change will significantly cut down on the amount of Docker clients that need to be created and used.
The client generally needs to be created once, and this also supports the pathway towards supporting more containerization run-times.
It updates some of the formatting for the status command
Adds a bunch of tests for all of the docker runtime packages
Notes
This is a big change, but all of the existing tests are still passing - important to point out.
Some of the language and structure in Pygmy has been bugging me for a while - years in fact. I've had some ideas how to fix this longer term but actually doing it has proved difficult more than once over the years. Seems I have been getting better at Go as I've managed to unpick this one quite nicely.
Now, things are more logically segmented between
Things that still need to be wiggled
Moving non-commands out of the commands directory (internal and external pathways)The following other things should be considered
status
commandNotes
This is a big change, but all of the existing tests are still passing - important to point out.