internal/stack: Cleanup API

This commit cleans up the internal stack API to prepare it for an
eventual move to using a native docker client.
This commit is contained in:
Tom Wiesing 2022-09-02 17:52:06 +02:00
parent 7b38fdd801
commit 5d906169f4
No known key found for this signature in database
15 changed files with 96 additions and 65 deletions

View file

@ -114,13 +114,13 @@ func (si systemupdate) Run(context wisski_distillery.Context) error {
for _, stack := range dis.Stacks() {
if err := logging.LogOperation(func() error {
return stack.Install(context.IOStream, ctx)
}, context.IOStream, "Installing docker stack %q", stack.Name); err != nil {
}, context.IOStream, "Installing docker stack %q", stack.Dir); err != nil {
return err
}
if err := logging.LogOperation(func() error {
return stack.Update(context.IOStream, true)
}, context.IOStream, "Updating docker stack %q", stack.Name); err != nil {
}, context.IOStream, "Updating docker stack %q", stack.Dir); err != nil {
return err
}
}