1
// Copyright 2015 Canonical Ltd.
2
// Licensed under the AGPLv3, see LICENCE file for details.
6
// FinishedWorker is a worker that stops immediately with no error
7
// when started by a Runner, which then removes it from the list of
8
// workers without restarting it. Simply return FinishedWorker{}
9
// where you need to avoid starting a worker at all.
10
type FinishedWorker struct{}
12
// Kill implements Worker.Kill() and does nothing.
13
func (w FinishedWorker) Kill() {}
15
// Wait implements Worker.Wait() and immediately returns no error.
16
func (w FinishedWorker) Wait() error { return nil }