Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InstanceOperation ¶
type InstanceOperation struct {
// contains filtered or unexported fields
}
InstanceOperation operation locking.
func Create ¶
Create creates a new operation lock for an Instance if one does not already exist and returns it. The lock will be released after 30s or when Done() is called, which ever occurs first. If reusable is set as true then future lock attempts can specify the reuse argument as true which will then trigger a reset of the 30s timeout on the existing lock and return it.
func Get ¶
func Get(instanceID int) *InstanceOperation
Get retrieves an existing lock or returns nil if no lock exists.
func (InstanceOperation) Action ¶
func (op InstanceOperation) Action() string
Action returns operation's action.
func (*InstanceOperation) Done ¶
func (op *InstanceOperation) Done(err error)
Done indicates the operation has finished.
func (*InstanceOperation) Reset ¶
func (op *InstanceOperation) Reset() error
Reset resets an operation.
func (*InstanceOperation) Wait ¶
func (op *InstanceOperation) Wait() error
Wait waits for an operation to finish.
Click to show internal directories.
Click to hide internal directories.