~nskaggs/+junk/xenial-test

« back to all changes in this revision

Viewing changes to src/github.com/juju/juju/worker/uniter/operation/lock.go

  • Committer: Nicholas Skaggs
  • Date: 2016-10-24 20:56:05 UTC
  • Revision ID: nicholas.skaggs@canonical.com-20161024205605-z8lta0uvuhtxwzwl
Initi with beta15

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// Copyright 2014-2015 Canonical Ltd.
 
2
// Copyright 2015 Cloudbase Solutions SRL
 
3
// Licensed under the AGPLv3, see LICENCE file for details.
 
4
 
 
5
package operation
 
6
 
 
7
// DoesNotRequireMachineLock is embedded in the various operations to express whether
 
8
// they need a global machine lock or not.
 
9
type RequiresMachineLock struct{}
 
10
 
 
11
// NeedsGlobalMachineLock is part of the Operation interface.
 
12
// It is embedded in the various operations.
 
13
func (RequiresMachineLock) NeedsGlobalMachineLock() bool { return true }
 
14
 
 
15
// DoesNotRequireMachineLock is embedded in the various operations to express whether
 
16
// they need a global machine lock or not.
 
17
type DoesNotRequireMachineLock struct{}
 
18
 
 
19
// NeedsGlobalMachineLock is part of the Operation interface.
 
20
// It is embedded in the various operations.
 
21
func (DoesNotRequireMachineLock) NeedsGlobalMachineLock() bool { return false }