github.com/wallyworld/juju@v0.0.0-20161013125918-6cf1bc9d917a/worker/uniter/operation/skip.go (about) 1 // Copyright 2014-2015 Canonical Ltd. 2 // Licensed under the AGPLv3, see LICENCE file for details. 3 4 package operation 5 6 import ( 7 "fmt" 8 ) 9 10 type skipOperation struct { 11 Operation 12 } 13 14 // String is part of the Operation interface. 15 func (op *skipOperation) String() string { 16 return fmt.Sprintf("skip %s", op.Operation) 17 } 18 19 // NeedsGlobalMachineLock is part of the Operation interface. 20 func (op *skipOperation) NeedsGlobalMachineLock() bool { 21 return false 22 } 23 24 // Prepare is part of the Operation interface. 25 func (op *skipOperation) Prepare(state State) (*State, error) { 26 return nil, ErrSkipExecute 27 } 28 29 // Execute is part of the Operation interface. 30 func (op *skipOperation) Execute(state State) (*State, error) { 31 return nil, ErrSkipExecute 32 }